title: ASP.NET and C# Redirect
body: <p>I am working on a project for school, and this is an extra credit part. I have a project started in VS 2010 using master pages, and what I'm trying to do is get a "Submit" button to redirect people to the "MyAccounts.aspx" page. My current code for the ASP part for the button looks like this:</p>
  
  <p><code>&lt;asp:Button ID="btnTransfer" runat="server" Text="Submit"/&gt;</code></p>
  
  <p>I have tried adding in the <code>OnClick</code> option, as well as the <code>OnClientClick</code> option. I have also added this code to the Site.Master.cs file as well as the Transfer.aspx.cs file:</p>
  
  <pre><code>protected void btnTransfer_Click(object sender, EventArgs e)
  {
      Response.Redirect(Page.ResolveClientUrl("/MyAccounts.aspx"));
  }
  </code></pre>
  
  <p>When I run this and view the project in my browser, the whole thing runs fine, but when I click on the "Submit" button, it just refreshes the current page and does not properly redirect to the MyAccounts page. Anyone have any ideas for me?</p>