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 5942181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:12:56+00:00 2026-05-22T16:12:56+00:00

I am using ASP.NET Webforms C# 3.5 and utilizing Response.Redirect to redirect the page

  • 0

I am using ASP.NET Webforms C# 3.5 and utilizing Response.Redirect to redirect the page after an event call.

If I submit a request the first request works fine. I am using Response.Redirect currently.
I have tried using Server.Transfer and passing True and False as the second parameter to the Redirect function as well as attempting to turn off SmartNavigation.

IF I click my submit button the page does what it’s supposed to and the anchor forces the page to the correct location. If I then click submit again the same URL is returned and the browser doesn’t do anything but sit and “hang.” If I remove the hashed portion from my URL the redirect works fine.

The problem only seems to occur if the request was redirected to the current URL with an anchor and a new redirect occurs with the anchor (hash symbol)

Response.Redirect(/Script.aspx?param1=something&param2=something#anchor);

I’ve also tried this:

Response.Redirect(/Script.aspx?param1=something&param2=something&#anchor);

In either case removing the Anchor fixes the problem.

This problem occurs in Chrome and Firefox. Firebug reports the request completing and shows the response string and everything looks like it should with pound sign and all but the browser just hangs. By hang I mean shows the cursor as the progress\doing something cursor type.

  • 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-05-22T16:12:57+00:00Added an answer on May 22, 2026 at 4:12 pm

    This is a common problem with Response.Redirect.

    You can either set

    Response.Headers.Add("Location", "/Script.aspx?param1=something#anchor");
    Response.Status = "301 Moved Permanently"; //or whatever status code you want to deliver, 302 or 307 are standard for Response.Redirect(...)
    

    Or you can pass it as an additional query string parameter and use javascript to append the anchor:

    //page
    Response.Redirect("/Script.aspx?param1=something&anchor=anchor");
    
    //script.aspx
    void Page_Init(object sender, EventArgs e)
    {
        ClientScript.RegisterClientScriptBlock(typeof(string), "anchor", "<script type=\"text/javascript\">location.href = location.href + '#" + Request["anchor"] + "';</script>");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET Webforms with C#. On one page I click submit to
I have a asp.net webforms page in which I'm using the jqGrid component. The
I'm using ASP.NET Webforms 4.0, and v5.3.2 of the SDK. Currently my app works
I am using ASP.NET Webforms and in one page I want to make an
I'm having trouble with this simple scenario. First, I'm using ASP.NET WebForms. I'm making
Is there a way to detect page refresh without using viewstate in asp.net webforms
I am using asp.net webforms; I want to submit a form and keep the
When using ASP.net webforms my usual solution would have following type of setup -
Im using asp.net webforms. c# I want to validate a form. In the codebehind
I am using jquery with asp.net webforms..... I am using asp.net pagemethods and jquery....

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.