title: ASP.NET navigate to anchor in code behind
body: <p>I have a simple Web Form with code like this:</p>
  
  <pre><code>//...
  //tons of text
  //...
  &lt;a name="message" /&gt;
  //...
  //tons of text
  //...
  &lt;asp:Button ID="ButtonSend" 
                  runat="server" 
                  text="Send"
                  onclick="ButtonSend_Click" /&gt;
  </code></pre>
  
  <p>After POST I want to navigate user to my anchor "message". I have following code for this:</p>
  
  <pre><code>protected void ButtonSend_Click(object sender, EventArgs e)
  {
  this.ClientScript.RegisterStartupScript(this.GetType(),
                                          "navigate",
                                          "window.location.hash='#message';",
                                          true);
  }
  </code></pre>
  
  <p>This simple JavaScript is not working in Firefox 3.5.2 - url is changing in browser but page is not navigated to anchor. In IE 8 it works perfectly.</p>
  
  <p>Why this JavaScript code is not working in Firefox? Am I missing something?</p>