Reputation: 1253
I have created an ASP.NET WebForm application. Let's say for example I have a string value and want to send it to another page in my app e.g.
string sValue = "information";
I then put this into a session as so:
Session["value"] = sValue;
I then want to navigate to another page in my web app so i use:
Response.Redirect("~/ViewInvoices.aspx");
However when I try to extract any information from the session it is null
string sValue = Session["value"]; <-is now null
Could anyone either spot the problem or even better offer a solution to make this work?
Upvotes: 0
Views: 2601
Reputation: 14243
Use this for redirecting:
Response.Redirect("~/ViewInvoices.aspx", false);
Upvotes: 1