Last post Nov 13, 2009 10:25 PM by RickNZ
Nov 13, 2009 09:35 PM|ashok.k|LINK
I am working on an ASP.NET 3.5 web application. I have written the following code in Master page to redirect the page to Login if the session is null.
If the session expires, execution goes to else block but does not end the execution. If the post back is on a button click on a
page, it goes to Master page and checks the session. But continues the Button click code even if the session is expired.
if (Session["UserName"] !=
String.Concat("Welcome : ", userName);
I want to stop the execution if code in button click event and redirect to Login page once the session is expired.
How to stop execution after Response.Redirect() and redirect to Login page?
Nov 13, 2009 10:14 PM|ankit_sam2001|LINK
Yes, I m also facing this problem.
I want to execute javascipt and then redirect the page.
But the page just redirects and does not execute clientscript.
Nov 13, 2009 10:25 PM|RickNZ|LINK
The second argument is endResponse. When true, it, well, ends the request. It does so by throwing a ThreadAbortException after the redirect is sent.