i have web app and on session timeout and user interaction on the page, this needs to redirect to home/landing page
solutions found on the net
1) Session check in page_load of all the aspx pages of the application. 2) code in session start of global.asax
public void Session_Start
{
Response.Redirect("home.aspx");
// or Server.Transfer("home.aspx");
}
I am going for 2nd option,let me know 1) whether i am in right way or any better solutions for this? 2) in the second option whether to use Response.Redirect or Server.Transfer
-Thanks
Why don't you use JavaScript to do it? you can use
setTimeout
method likePut the above js code block into the page header which 3000 is your session timeout.
I will go for the first one and do check for the session.....
Write following code in OnInit method of the Master page will do your tack easily