Problems with Response.Redirect

Results 1 to 2 of 2

Thread: Problems with Response.Redirect

  1. #1
    Join Date
    Dec 1969

    Default Problems with Response.Redirect

    I have an ASP .NET Page “Default.aspx” with Web Controls and I have a CANCEL button that has as unique instruction Response.Redirect("http://PEPE/Aplic/Default.aspx"). That´s right. The problem is that when this button is executed the page starts executing again (Load Event), but after this it always returns to the Cancel button code to the CATCH error sections and it says ThreadAbortException. <BR>In the SAVE button it happens the same with the last instruction Response.Redirect("Default.aspx?Accion=S"). I probed with Server.Transfer but the error is the same.<BR><BR><BR>WHAT HAPPENS?????<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Problems with Response.Redirect

    Page_Load always executes before the event handler code. So, if you click the CANCEL button and the CANCEL event handler just does a redirect to the same page, you should expect Page_Load to run as a postback, then the CANCEL event handler to run which redirects you back to the same page, and then the Page_Load to run again as a nonpostback. Hope that helps.<BR><BR>Sara

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts