Avatar of TrialUser
TrialUserFlag for Afghanistan 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
ASP.NETVisual Basic.NETC#

Avatar of undefined
Last Comment
TrialUser

8/22/2022 - Mon
jppinto

Please take a look at this tutorial:

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

jppinto
ASKER CERTIFIED SOLUTION
Pra4444

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
NileshThakkar

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.
ASKER
TrialUser

thx
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy