I am facing a problem.
I maintain a session after login like session["UserID"]
and every page is locked with this session like
if(session["UserID"] == "")
{
Response.redirect("./loginpage.aspx");
}
else
{
// page working code
}
Problem is that i am saving the data then redirect the page after saving session was automatically clear and the page is redirect to login page.
in web config file i write this line
<sessionState mode="InProc" timeout="60">
how i solved this problem to stay in session state on save data and redirecting the same page.
您可以在重定向到loginpage.aspx之前使用Session.Abandon()调用
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.