title: Submit buttons behaviour in ASP.NET
body: <p>Is there any way to manageme Submit buttons behaviour?</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;    
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
      &lt;/asp:ScriptManager&gt;    
      &lt;asp:UpdatePanel ID="up1" runat="server"&gt;
      &lt;ContentTemplate&gt;
          &lt;asp:TextBox runat="server" ID="tb1" /&gt;
          &lt;asp:Button runat="server" ID="btnSubmit1" UseSubmitBehavior="true" /&gt;
      &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
      &lt;asp:UpdatePanel ID="up2" runat="server"&gt;
      &lt;ContentTemplate&gt;
          &lt;asp:TextBox runat="server" ID="tb2"&gt; /&gt;
          &lt;asp:Button runat="server" ID="btnSubmit2" UseSubmitBehavior="true" /&gt;
      &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;        
  &lt;/form&gt;
  </code></pre>
  
  <p>If we are on focus on "tb2", I wish that "btnSubmit2" will have control over "Submit" behaviour (e.g. pressing enter). we are on focus on "tb1", I wish that "btnSubmit1" will have control over "Submit" behaviour (e.g. pressing enter). </p>
  
  <p>I presume it should be implemented in the ASP.NET infrastructure, and if not, what is the best way to implement management of Submit buttons behaviour in ASP.NET 3.5 or ASP.NET 4.0?</p>
  
  <p>Thanks in advance.</p>