Yup, common problem. You need to fix it with one line of .Net and some javascript: .net:
q.Attributes.Add("onkeypress", "return clickButton(event, '" & btnSearch.ClientID & "')")
Where 'q' is the ID of your <asp:textbox> and btnSearch is the id of your <asp:Button>
Then, you need the ClickButton javascript code:
function clickButton(e, buttonid){
var bt = document.getElementById(buttonid);
if (typeof bt == 'object'){
if(navigator.appName.indexOf("Netscape")>(-1)){
if (e.keyCode == 13){
bt.click();
return false;
}
}
if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){
if (event.keyCode == 13){
bt.click();
return false;
} } } }
And you're done. Hitting enter inside the box will now submit the form like someone clicked the Go! button.
Chip-