Auto submit when pressing enter

  • Thread starter Thread starter mazdotnet
  • Start date Start date
M

mazdotnet

Hi,

We have a internal site using Master Pages that has a header (web user
control) on top of every page with a search feature. This search is
basically a textbox and a search button beside it which works when you
click on the submit button. Is it possible to change it so that it's
automatically submitted when you click enter in the textbox?

Thanks
M.
 
In ASP.NET 2.0 the panel control has a new DefaultButton property.
Set this property to the ID of a button control and it will be the default
button when focus is in that panel. So the enter key would work as you
desire.
 
Back
Top