How to Handle Enter Key on TextBox in Asp.Net

Leave a Comment

Setting the default button when a user hits the "enter" key can be done using the defaultButton attribute.

Example
<form defaultButton = "btnSearch" runat = "server" >

The <asp:panel> control can override the defaultButton specified when the panel has focus:
<asp:Panel runat="server" defaultButton = "btnOK" >
...
</asp:Panel>

0 comments:

Post a Comment