New Message on dotNET User Group Hyd

Thread.ThreadAbortException (ASP.NET) VERY URGENT .........................

Reply
  Reply to Sender   Recommend Message 4 in Discussion
From: johnsonsmithy2k2

That's actually normal behavior as Response.Redirect calls Response.End which prematurely ends the page's running thread thus throwing the exception. You can get around the exception by either wraping the redirect in a Try..Catch block that eats (ignores) the exception or by using the overloaded version of Response.Redirect that takes an additional boolean value which allows the running thread to continue:
Method 1:
Try
   Response.Redirect("mypage.aspx") or Server.Transfer("myPage.aspx")
Catch ex as System.Threading.ThreadAbortException
   'do nothing here
End Try
Method 2:
   Response.Redirect("mypage.aspx", False) or Server.Transfer("myPage.aspx")
 
Note that if you are using method 2, any code following the Redirect will continue to execute.
 
Thanx,
Smith

View other groups in this category.

Click Here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to