Newline when using asp.net visible=false
when using asp.net´s visible=false e.g. for a htmlgenericcontrol asp.net renders a newline for a control that is set visible=false.
How to prevent this behavior?
I just have a
<ul> and then
<li runat="server" id="x"></li>
<li runat="server" id="x"></li>
<li runat="server" id="x"></li>
So one <li>
per line. If I set one or all li´s to visible=false by code I get newlines instead of "Not开发者_如何学Gohing"
Thanks.
Make sure there is no white space (spaces, tabs, new lines) around the control in the aspx
page.
Try the following, all in one line:
<ul><li runat="server" id="x"></li><li runat="server" id="x"></li><li runat="server" id="x"></li></ul>
精彩评论