title: ASP.NET Link Enter key with buttons?
body: <p>I stumbled across a little problem with an ASP.NET Web Application.</p>
  
  <p>I got a couple buttons on my page that I want to access by pressing my Enter key (Depending on which <code>TextBox</code> is focused).</p>
  
  <p>Googled helped me, I thought, but no.</p>
  
  <p>This is what I found:</p>
  
  <pre><code>tbEmail.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btRegister.UniqueID + "').click();return false;}} else {return true}; ");
  </code></pre>
  
  <p><a href="http://www.beansoftware.com/ASP.NET-Tutorials/Accept-Enter-Key.aspx" rel="noreferrer">Source</a></p>
  
  <p>This does not seem to work, it still presses another button that I do not want to be pressed at this moment.</p>
  
  <p>Any suggestions?</p>