I've got a class Users.
inside of which i'm trying to see if my session is not null
i keep getting an error: on this line:
if(HttpContext.Current.Session["StoreID"] == null)
"Object reference not set to an instance of an object"
Can anyone point me in a direction to get this fixed?
Thanks in Advance
Mike
Code:---
if((string)HttpContext.Current.Application["storeID"] == "error")
{
if(HttpContext.Current.Session["StoreID"] == null)
{
StoreID = "1";
}
StoreID = HttpContext.Current.Session["StoreID"].ToString();
}
else
{
StoreID = (string)HttpContext.Current.Application["storeID"];
}