I was trying to incorporate a functionality in my ASP.NET such that a DIV tag which contains the Profile Navigation Menu should only be visible if a person is logged in.
I know the condition on how to if the person is logged in or not but wanted to know the method to toggle the div tag on/off based on person’s logged in status.
if(loggedin==yes)
{
//?
}
Thanks
You can set the div to
runat="server", and then access it as a variable in your code-behind page and set Visible to false.That is, you’d have something like:
And then in your CS file: