Reputation: 35
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 approach?
Thanks in advance!
Upvotes: 1
Views: 194
Reputation: 512
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
Upvotes: 1
Reputation: 36310
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.
Upvotes: 1
Reputation: 35
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.
Upvotes: -1