title: How to move asp.net page to top in c#
body: <p>If the end user scrolls down a page, I would like to move the page back to the top with a button click. The user clicks the button, and I do validation. The error message is at the top of the page, and the button is at the bottom of the page. If something is invalid, then I want to send the user scroll back to the top of the page so they can see the error message. </p>
  
  <p>How can I do this? I don't want to use java-script, unless I have to. Is there away to do this in C# from the code behind? </p>
  
  <p>I have tried this:</p>
  
  <pre><code>ScriptManager.RegisterStartupScript(Page, this.GetType(), "ScrollPage", "scrollToTop();", true);
  </code></pre>
  
  <p>At run time I get the error: 0x800a1391 - JavaScript runtime error: 'scrollToTop' is undefined</p>