Changing Default Submit Button

D

Don Miller

I have a webpage (form) that has multiple buttons contained within, and all
cause a postback if clicked. I have a textbox where users enter a phrase and
then have to click a "Search" button that does a search for what was
entered. Instead of requiring the user to manually mouseclick on the Search
button, I would just like the user to be able to hit the Enter key to begin
the search.

I'm not sure exactly what happens when an Enter button is pressed.

Is there a way to make any one button on the form (e.g. Search) the default
action when the page is posted back?

Thanks.
 
D

donet programmer

I am not aware of any custom solutions, default behavior of the form
is to trigger click event of the very first submit button on the form
(first button from left to right and top to bottom of the page).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top