Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-11
4
Medium Priority
?
830 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

783 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