G
Guest
For some reason my Session state stopped working in my webpages. I cannot
pass a variable from one webpage to another using the Session. For example:
Web page 1:
Session["filepath"] = dbname;
Response.Redirect("Webpage2");
Webpage 2:
protected string filepath;
private void Page_Load(object sender, System.EventArgs e)
{
filepath = (Session["filepath"]).ToString();
I receive the following message when the above instruction is reached
"Object reference not set to an instance of an object."
Can anyone tell me why this is happening? This has been working for 2 years
and now it is not! Some environmental variable must have changed but what?
pass a variable from one webpage to another using the Session. For example:
Web page 1:
Session["filepath"] = dbname;
Response.Redirect("Webpage2");
Webpage 2:
protected string filepath;
private void Page_Load(object sender, System.EventArgs e)
{
filepath = (Session["filepath"]).ToString();
I receive the following message when the above instruction is reached
"Object reference not set to an instance of an object."
Can anyone tell me why this is happening? This has been working for 2 years
and now it is not! Some environmental variable must have changed but what?