Session Variables Problem
Hi guys,
The code in one my aspx files is as follows.
string sString;
sString= Session["sfetchline"].ToString();
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindGrid();
}
}
When this page is called. I get the error as follows(line 24)
System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 23: string sString;
[B] Line 24: sString= Session["sfetchline"].ToString(); [B]
Line 25:
Line 26: if (!Page.IsPostBack)
I am using the same method to retrieve data from Session variables in other pages as well. But I dont get any errors.