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?
Try this. Your markup:
some content
.. and in aspx.cs file:
protected void Page_Load(object sender, EventArgs e) { if (Session["someSessionVal"].ToString() == "some value") { MyId.Visible = true; } else { MyId.Visible = false; } }