Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
How do I get the display postion of a control in code behind?

I have a button, which display at a place. If I wanted to know the button display postion then how can I get this? I did not set button postion, but on display postion of this button I wanted to set my another control postion so how can I get/set the postion of button?

I wanted to do everything from code behind.
Posted
Updated 7-Feb-11 18:34pm
v2
Comments
Raj.rcr 8-Feb-11 0:42am    
Use html tags for getting and setting the position of any control on ur form. You can do a lot with html..
amit_83 8-Feb-11 0:49am    
i know, but i don't know how to do it,
Do you have any example?

1 solution

Try this, u will understand..

XML
<table style="width:100%;font-size:10pt;" class="DataTable" id="tbBtn" runat="server" visible="false">
               <tr>
                     <td colspan="2" style="text-align:center">
                                        <asp:Button ID="btnAccept" runat="server" CssClass="Button" OnClick="btnAccept_Click" Text="Accept" Width="60px" />
</td> 
  </tr>
</table>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900