?
Solved

Default button in ASP.NET

Posted on 2004-09-03
6
Medium Priority
?
1,948 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 400 total points
ID: 12000567
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to count occurrences of each item in an array.

650 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