Solved

enter key to trigger submit button in asp.net web [age

Posted on 2010-11-11
4
822 Views
Last Modified: 2012-06-22
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
0
Comment
Question by:TrialUser
4 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34114604
Please take a look at this tutorial:

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

jppinto
0
 
LVL 12

Accepted Solution

by:
Pra4444 earned 500 total points
ID: 34114618
0
 
LVL 1

Expert Comment

by:NileshThakkar
ID: 34122709
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
 

Author Closing Comment

by:TrialUser
ID: 34259703
thx
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now