Solved

Default button in ASP.NET

Posted on 2004-09-03
6
1,925 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to count occurrences of each item in an array.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

809 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