M
Maziar Aflatoun
Hi,
I'm writing a second user login for our website. I have a login page which
sets a session value and redirects the user back.
I have the following in the login page.
Session["UserID"]=UserID;
Session.Add("isAuthenticated",true);
System.Diagnostics.Debug.WriteLine("UserID:"+
Session["UserID"].ToString()); // works
Response.Redirect(ReturnURL);
However, in the return page the value becomes null
try
{
Response.Write("isAuthenticated:" + Session["UserID"].ToString() +
"<br>");
}
catch
{
Response.Write("isAuthenticated is empty<br>");
}
Any suggestions?
Thanks
Maz
I'm writing a second user login for our website. I have a login page which
sets a session value and redirects the user back.
I have the following in the login page.
Session["UserID"]=UserID;
Session.Add("isAuthenticated",true);
System.Diagnostics.Debug.WriteLine("UserID:"+
Session["UserID"].ToString()); // works
Response.Redirect(ReturnURL);
However, in the return page the value becomes null
try
{
Response.Write("isAuthenticated:" + Session["UserID"].ToString() +
"<br>");
}
catch
{
Response.Write("isAuthenticated is empty<br>");
}
Any suggestions?
Thanks
Maz