0

Why debugger going into catch block. What's the issue?? kindly tell me.

exception:"Thread was being aborted".

    protected void lnkResponse_Click(object sender, EventArgs e)
    {
        try
        {
            Session["idTicket"] = hfIdTicket.Value;

            Response.Redirect("~/Forms/TicketChat.aspx");
        }
        catch (Exception)
        {

            throw;
        }
    }
raza sarwar
  • 59
  • 1
  • 7

1 Answers1

0

Response.Redirect throws the System.Threading.ThreadAbortException exception.

Try using an overload, Response.Redirect(String url, bool endResponse) that passes false for the endResponse parameter to suppress the internal call to Response.End.

Response.Redirect ("~/Forms/TicketChat.aspx", false);
waka
  • 3,362
  • 9
  • 35
  • 54
Musab
  • 1,067
  • 12
  • 12