开发者

asp.NET If then inside of DIV tag?

I have two menus based on someones credentials.

The menu is an UL within a wrapping DIV and I would like to place an If Then within that DIV to set is class dynamically.

Does anyone know if this is possible or if there is a better appr开发者_StackOverflow社区oach?

Thanks in advance!


Give the element an id and add the runat="server" attribute to it. You can now access if from your code and set its attributes programmatically.


If its just a div, you can use asp:Panel instead -- asp:Panel will render a Div, and you can set its visibility in your code behind


Scratch that, actually that wont work.

I need to hide a specific list item and so what I will simply do is write that list item dynamically when the correct user is logged in.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜