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

  • SEARCH
  • Home
  • 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 7907983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:42:41+00:00 2026-06-03T11:42:41+00:00

I have a regular Asp.Net 4.0 webforms website. When I do: Response.Redirect(SomePage.aspx); I’d expect

  • 0

I have a regular Asp.Net 4.0 webforms website. When I do:

Response.Redirect("SomePage.aspx");

I’d expect that my next line of code would be executed. However, surprisingly the next line of code is never executed. Can anybody know when and why does that happen?

  • 1 1 Answer
  • 0 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-06-03T11:42:44+00:00Added an answer on June 3, 2026 at 11:42 am

    Response.Redirect also accepts two parameters. The second parameter which is a boolean denotes whether the execution of the current page should terminate.

    So, calling Response.Redirect("Page.aspx",false) would execute the subsequent lines of code and will avoid ThreadAbortException being flooded in your log files.

    Update: To answer why the default behavior is to not execute

    When Response.Redirect is used the expectation is to send only the 302 header to the client. Hence by default, it flushes the response & aborts the current thread, so the subsequent action will not be performed.

    Example, in the authorization / authentication module once we know that the user is not eligible to access the resource, we just do a redirection and rest of the event life cycle should not get executed for security reasons.

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

Sidebar

Related Questions

We have an ASP.NET webforms app that has try/catch blocks all throughout. In the
I have a regular expression that works fine for me when used in ASP.NET
I have a asp.net textbox that uses a RegularExpressionValidator. If the regular expression fails,
I have an ASP.NET http module that adds a Response Filter and does some
I have a regular .NET application. In this case I have a part that's
I have an ASP.net page with dynamic content that are inside Controls, some of
My application is in ASP.NET 2.0 with C#. I have a regular expression validator
I have an ASP.NET MVC 2 form that is working perfectly, doing client side
I have been using the following regular expression in ASP.NET and Javascript: [a-zA-ZöäüÖÄÜß0-9]{1}[a-zA-ZöäüÖÄÜß0-9_.\-]{2,14}[a-zA-ZöäüÖÄÜß0-9.!]{1} Now,
I'm experiencing a very strange problem... I have a regular ASP.Net webpage with a

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.