Click here to Skip to main content
16,015,531 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to get Panel height in code behind ?
Posted
Updated 8-Jun-20 10:51am
Comments
koool.kabeer 4-Aug-10 3:47am    
please give clear scenario.... which Panel?
aspPanel?.
if it is then..
panel1.Height will give you the height in codebehind...
be cleared.... please

As stated, myPanel.Height is the way.

Look here for all the properties of a Panel: MSDN: Panel[^]
 
Share this answer
 
Hi Kabeer,
Here is my scenario...

The characters that are entered in the text box will be displayed in the label at the button click event. Label is having fixed width for ex,200px but the height is not set for the label.

By changing the characters in the text box,and firing the button click event the label will get populated with the text from the text box. At that time label width will be constant but height will change dynamically according to the no of characters entered in the textbox.....

Here I need to get the label height in pixels on the button click event???????

Thanks in Advance ?Can Anyone help me????
 
Share this answer
 

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