nullreferenceexception was unhandled by user code
we are using this session in the menus, if the user has admin rights some menus are shown otherwise not shown. here is the code
<tr><td>
<%if (System.Web.HttpContext.Current.Session["admin"].ToString() == "Y")
{ %>
<li style="width:124px;"><a href="#" style="text-decoration:none;">Add Location</a>
<%}
else if (System.Web.HttpContext.Current.Session["admin"].ToString() == "N")
{ %>
<li style="width:124px;"><a href="#" style="text-decoration:none;"> Location </a>
<%} %>
</td></tr>
And we use the session time out as 540. but why this error message shown .. Thanks in Advance
|