Changing Default Submit Button

  • Thread starter Thread starter Don Miller
  • Start date Start date
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.
 
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).
 
Back
Top