TrialUser
asked on
enter key to trigger submit button in asp.net web [age
In my asp.net web application in the master page, I have a textbox and a button. when the user enters a text in the textbox and hits on the enter key, i would like for the button click to be triggered, i.e submit the form. how can i achieve that. please suggest. thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
You can place button in <asp:Panel> and set panel's default button property as shown in below example:
<asp:panel defaultbutton="button2" runat="server">
<asp:textbox id="textbox3" runat="server"/>
<asp:button id="button2" runat="server"/>
</asp:panel>
Vote this answer if it helps you.
You can place button in <asp:Panel> and set panel's default button property as shown in below example:
<asp:panel defaultbutton="button2" runat="server">
<asp:textbox id="textbox3" runat="server"/>
<asp:button id="button2" runat="server"/>
</asp:panel>
Vote this answer if it helps you.
ASKER
thx
http://www.beansoftware.com/ASP.NET-Tutorials/Accept-Enter-Key.aspx
jppinto