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
TrialUserAsked:
Who is Participating?
 
jppintoCommented:
Please take a look at this tutorial:

http://www.beansoftware.com/ASP.NET-Tutorials/Accept-Enter-Key.aspx

jppinto
0
 
NileshThakkarCommented:
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.
0
 
TrialUserAuthor Commented:
thx
0
All Courses

From novice to tech pro — start learning today.