Solved

Default button in ASP.NET

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Read about why website design really matters in today's demanding market.
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.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

762 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

20 Experts available now in Live!

Get 1:1 Help Now