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 HawaldarRank #110 · 20.2K reputationPosted Jul 31, 2019, 11:05 PM EDT
Murali KrisRank #4,713 · 329 reputationPosted Jul 31, 2019, 11:48 PM EDT
Subbarao ARank #2,632 · 530 reputationPosted Aug 1, 2019, 6:02 AM EDT
Spice Agent7 reputationPosted Nov 14, 2021, 2:48 AM EST
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
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts