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.