I'm making Li
menu visible to some users only, but after session time out its getting error:
Object reference not set to an instance.
How to avoid this error if session time out.
if (Session["LoggedInUser"].ToString() == "admin" || Session["LoggedInUserLower"].ToString() == "admin")
{
liBatch.Visible = true;
}
else
{
liBatch.Visible = false;
}