To avoid ThreadAbortException while Redirect
You don't need to put the redirect in a try-catch block. Just replace all calls to Response.Redirect(url) with the following two lines:
Response.Redirect(url, false);
That will avoid the exception being thrown and gracefully end execution of the thread and event chain. See http://www.c6software.com/CodeSolutions/dotnet/ThreadAbortException.aspx for a full solution explanation.
1 comment:
So, how to stop the page event?
Post a Comment