开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜