Web developers wiki ASP.NET Sitecore Sharepoint Kentico by Evident Interactive

To make search forms more usable it is considered best practice to make it possible to submit the form with the 'Enter' key next to the normal search button. Normally you would use a javascript on the 'searchterm' input field.

onKeyPress="if (event.keyCode == 13){ document.myForm.submitButtton.click();return false;}"

This will work in FF2, but will not submit the page in IE7.

A solution is to nest the form into an .NET Panel with a DefaultButton set.

asp:Panel runat="server" ID="test" DefaultButton="btnSearch"

 © Evident Interactive BV