Loading ...

How to make default submit button for Enter key | CodeAsp.Net

How to make default submit button for Enter key in asp.net

 /5
0 (0votes)

To make the default submit button for enter key, we have to use the default key property of Form tag or panel control.
I have given the example that describe how to implement it in different scope depends on your actual need.
Here goes some code snippet

<form id="form1" runat="server" defaultbuton="btnSubmit">
     <asp:Button ID="btnSubmit" runat="server"/>
</form>


<asp:Panel ID="pnl1" runat="server" DefaultButton="btnSubmit">
     <asp:Button ID="btnSubmit" runat="server"/>
</asp:Panel>


Hope this will help you

Comments (1)

   
sunitha
This post is really helpfull..thanks for sharing..
6/19/2009
 · 
by

Top Posts