Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default button on enter

Status
Not open for further replies.

Rowse

Technical User
Dec 20, 2002
62
GB
I have a asp.net page with multiple buttons on, how can i get the enter key to select the save button only, rather than any other button on the page?

Supplier of Asset Financial Software
Web based, and pocket pc compatible
 
wrap the controls in an asp:panel and set the save button as the default button for the panel

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
ok thanks, i wasnt sure if there was a way of telling the actual button using an onpress command

Supplier of Asset Financial Software
Web based, and pocket pc compatible
 
sure you could wire js up to it as well. in the end it's just html

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
If you want a default for the page, you can put this on the form tag of the HTML
Code:
defaultbutton="YourButtonNameHere"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top