I have some textboxes and a button (btnShowUserControl) control. At the bottom of the form; I have a placeholder (visible=false) for a user control. When the button btnShowUserControl is clicked; I set the property of the placeholder to visible=true.
it all works fine but the problem is vertical spacing between control which increases by 100% of the origoinal space. How do I fix it?
moquamar
Member
46 Points
149 Posts
Vertical Space between controls is messed up
Jul 05, 2012 12:08 AM|LINK
I have some textboxes and a button (btnShowUserControl) control. At the bottom of the form; I have a placeholder (visible=false) for a user control. When the button btnShowUserControl is clicked; I set the property of the placeholder to visible=true.
it all works fine but the problem is vertical spacing between control which increases by 100% of the origoinal space. How do I fix it?
Buton1
Button 2
will display as:
Button1
Button2
Careed
All-Star
18774 Points
3637 Posts
Re: Vertical Space between controls is messed up
Jul 05, 2012 03:08 AM|LINK
Can you show your ASPX markup? Also, if you have any CSS involved, present that as well.
"The oxen are slow, but the earth is patient."
oned_gk
All-Star
31776 Points
6493 Posts
Re: Vertical Space between controls is messed up
Jul 05, 2012 03:41 AM|LINK
when placeholder visible you lost placeholder style too and other content style inside it.
You can place button/cph in a table as layout or panel to handle the style.
moquamar
Member
46 Points
149 Posts
Re: Vertical Space between controls is messed up
Jul 05, 2012 03:58 AM|LINK
Thanks for pointing me to the right direction; it was indeed the following CSS and all worked fine when I removed it.
<style type="text/css"> .style2 { width: 263px; } .style3 { height: 32px; width: 263px; } .style1 { height: 32px; } </style>