Hi all,
i would like to know why i am getting error in catch method this error.
in try catch
inserting data after inserting redirecting to success page, after redirecting, noticed error in catche method
try{
//Peice of code to insert data
cmd.ExecuteNonQuery();
Response.Redirect("RegistrationsuccessPage.aspx");
}
Catch (Exception ex)
{
Response.Write("Error:" + ex.Message);//Thread was being aborted
}
can some one help me how to solve this error.
Rajanikant HawaldarPosted Aug 1, 2019, 3:05 AM
Spice AgentPosted Nov 14, 2021, 7:48 AM
For Response.Redirect, use an overload, Response.Redirect(String url, bool endResponse) that passes false for the endResponse parameter to suppress the internal call to Response.End. https://vidmateapp.win
Subbarao APosted Aug 1, 2019, 10:02 AM
Murali KrisPosted Aug 1, 2019, 3:48 AM