I'm facing a problem when redirecting to a page. Please have a look at my code and how i may solve it. The manifest is that after saving variables in session and redirect to a new page, the session variables are lost, and a new sessionId is created. I am a novice. Please advice.
Login.aspx:
Util.IsAdminUser= false; // save in session Util.IsAdminUser
Util.IsSpecialUser = true; //save in session Util.IsSpecialUser
Response.Redirect(Pages.SelectAccounts, false);
return;
SelectAccounts.aspx:
Page_Load(object sender, EventArgs e)
{
if (!Util.IsAdminUser) // error of null, session is lost
{
...
...
}
}
protected void Session_Start(object sender, EventArgs e)
{
LoggerNet.Info("SessionId:" + Session.SessionID);
}
Thank you in advance