I am facing a problem.
I maintain a session after login like session["Us开发者_如何转开发erID"]
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.
you can use a Session.Abandon() call before redirecting to loginpage.aspx
精彩评论