I have a div element on my page that I wish to show/hide based on a session value in my code-behind. How can I do this?
Give the div "runat="server" and an id and you can reference it in your code behind.
"runat="server"
id
code behind
<div runat="server" id="theDiv">
In code behind:
{ theDiv.Visible = false; }
2.1m questions
2.1m answers
60 comments
57.0k users