title: how to make asp:button a default button on entering text to asp:textbox
body: <p>How can I set default button after text is entered into a text box. This is what I have so far. But it doesn't work</p>
  
  <pre><code>&lt;td&gt;
                      &lt;asp:Label ID="displayrowLabel" runat="server" Text="# of Rows Displayed:"&gt;&lt;/asp:Label&gt;
                      &lt;asp:TextBox ID="displayRowQuery" runat="server"&gt;&lt;/asp:TextBox&gt;
                      &lt;asp:Button ID="displayRowButton" runat="server" Text="Click" OnClick="ddlPageItems_SelectedIndexChanged" /&gt;
                      &lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="displayRowQuery"  ValidationExpression="[1-9][0-9]*"  ErrorMessage="Wrong Input" /&gt;
                  &lt;/td&gt;               
              &lt;/tr&gt;
          &lt;/table&gt;            
      &lt;/PagerTemplate&gt;
  </code></pre>
  
  <p>I tried adding some jquery to handle this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("displayRowQuery").keyup(function (event) {
          if (event.keyCode == 13) {
              $("displayRowButton").click();
          }
      });
  </code></pre>
  
  <p></p>