Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

Getting 'Thread was being aborted'

Some time we use Response.End, Response.Redirect or Server.Transfer, a error generated "Thread was being aborted" and comes in Catch Block.

This problem occurs in the Response.Redirect and Server.Transfer methods because both methods call Response.End internally. The Response.End method ends the page execution and shifts the execution to the Application_EndRequest. The code follows Response.End is not executed.

To remove this we need to enter the

Response.Redirect ("ThanksPage.aspx", false);

ThanksPage.aspx is page where we are redirecting.

Share this article   |    Print    |    Article read by 4134 times
Rohit kakria
I am software developer
Related Articles: No related article
Related Interview Questions: No related interview question