ASP.Net Session data lost between pages

Posted by Ananth on Stack Overflow See other posts from Stack Overflow or by Ananth
Published on 2010-03-23T20:32:11Z Indexed on 2010/03/23 20:33 UTC
Read the original article Hit count: 410

Filed under:
|
|
|
|

Hi, i came across a weird behavior today w/ my web application. When I navigate from a page to another, I lose one particular session variable data.

I'm able to launch the app in firefox and able to see that the session data is not lost.

I use Response.Redirect(page2, false) to redirect to another page.

Below code was used to track session variables

System.IO.StreamWriter sw = new System.IO.StreamWriter(@"c:\test.txt", true); for (int i = 0; i < Session.Count; i++) { sw.WriteLine(Session.Keys[i] + " " + Session.Contents[i]); } sw.Close();

Can anyone help me in this? Any help is appreciated.

~/Ananth

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET