Solved

Default button in ASP.NET

Posted on 2004-09-03
6
1,936 Views
Last Modified: 2013-11-25
In the old world HTML/ASP, the enter key acted as a
button click event for the default submit button on a
form.

Is there anyway to do this in ASP.Net? I have seen the
accesskey property, but I want to set up the enter key to
automatically call one of the button click events on the
form (specifically the submit buttom for the form...).

Thanks - KJ
0
Comment
Question by:KingJosh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 5

Expert Comment

by:prashantagarw10
ID: 11976330
Yes it is possible in ASp.Net
In dotenet ide select your form so that property window diaplys its properties. In that u will find a property called Submit button(or a close match to this name). In that the value is to be choosen from a dropdown which lists all buttons available on the form. Select your submit button and it will work on enter key!!

cheers!!
Prashant
0
 

Author Comment

by:KingJosh
ID: 11976760
I don't see my form in the drop-down.  I called it "frmMain" (<form id="frmMain" method="post" runat="server">), but it's not coming up as one of the controls.  Any idea why?
0
 
LVL 5

Accepted Solution

by:
prashantagarw10 earned 100 total points
ID: 12000567
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

717 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