Losing session variable across response.redirect in same folder

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi, I have a routine that sets some session variables and then redirects the
user to another page in the same application/ same folder.

=======
Session("MyName") = "Fredsmith"
Response.Redirect("./AnewPage.aspx")
=======

If I go, Response.Write(Session("MyName")) in the new page the session
variable does not exist.

I have all cookies enabled (session works for other pages) and understand
redirecting across different domains clears session variables etc but this
is a weird one!

I have debugged right up until the Response.Redirect call and the session
variable exists, it's the Redirect that is killing the session variable.

Help appreciated
Cheers
Mark
 
did you chack, that the application is not restarting at this point, for
some reason?
in AnewPage.aspx, do you still get session vars stored by other pages?
 
Back
Top