Wednesday, February 18, 2015

How to set a default button for div


Using this code


 onkeypress="return WebForm_FireDefaultButton(event, '<%=ButtonName.ClientID %>')"  

Example


 <div style="float: left" onkeypress="return WebForm_FireDefaultButton(event, '<%=btnCheckPin.ClientID %>')">  
       <asp:TextBox ID="txtPincode" runat="server" Style="padding: 5px;"></asp:TextBox>  
       <input type="button" class="common_button" onclick="checkDelivery();" value="Check" ID="btnCheckPin" runat="server" />  
  </div>  



No comments:

Post a Comment