Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 336253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:13:30+00:00 2026-05-12T10:13:30+00:00

I am learning ASP.NET and was looking at QueryStrings. One of the examples I

  • 0

I am learning ASP.NET and was looking at QueryStrings.

One of the examples I was looking at hooks a button up to a redirect call:

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            //throws ThreadAbortException: "Thread was being aborted"
            Response.Redirect("Form2.aspx");
        }
        catch (Exception Ex)
        {
            System.Diagnostics.Debug.WriteLine(Ex.Message);
        }
    }

Why does it throw a ThreadAbortException here? Is that normal? Should I do something about this? Exceptions are generally not a good thing, so I was alarmed when I saw this.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:13:31+00:00Added an answer on May 12, 2026 at 10:13 am

    This is by design. This KB article describes the behavior (also for the Request.End() and Server.Transfer() methods).

    For Response.Redirect() there exists an overload:

    Response.Redirect(String url, bool endResponse)
    

    If you pass endResponse=false, then the exception is not thrown (but the runtime will continue processing the current request).

    If endResponse=true (or if you use the overload without the bool argument), the exception is thrown and the current request will immediately be terminated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning ASP.NET MVC and bugged by one issue. In the HomeController, the Index
I'm learning ASP.NET MVC Framework, From some articles like this , it seems that
I'm still learning ASP.NET and I often see code like this throughout parts of
I'm just learning asp.net mvc and I'm trying to figure out how to move
Im in the process of learning asp.net 3.5, currently on webparts and co. Ive
I would like to start learning ASP.NET on a for-fun project. I'm hoping to
Where can I find a good tutorial on learning ASP.NET MVC using VB.net 2008
I've been learning the new ASP.NET MVC framwork lately and I've developed a test
I just uploaded my first ASP.NET (as part of my learning of vb.net) and
I've just been learning about master pages in ASP.NET 2.0. They sound great, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.