Fire event on enter key press for a asp.net textbox
<p>i have one </p>

<pre><code>&lt;asp:TextBox ID="txtAdd" runat="server" /&gt;
</code></pre>

<p>control, now after write something in this textbox, and user press ENTER key , i want to run some code from codebehind</p>

<p>what should i do?</p>

<p>Edited : </p>

<p>using Jquery i captured ENTER key button and fired some hidden button event</p>

<pre><code>$(document).ready(function(){ 
   $(window).keydown(function(e){
      if(e.keyCode == 13) $('#&lt;% addbtn.ClientID %&gt;'.click();
   }); 
});
</code></pre>

<p>but is there any better way ?</p>
