I have a *.aspx Web page that uses a *.master page. The *.master page includes a Google search field. When I type in a search term and press the Enter key, the page seems to submit itself - nothing else happens. The page should forward to Google search results.
The *.master page template uses its own FORM tag. The Google search field also uses its own FORM tag. I'm pretty sure that this is causing the problem.
You are correct that the Google search needs its own form tag to work properly as you originally intended. A alternate solution would be to create the Google search URI in the submit button event and do a Redirect to that after the post back which should achieve the same effect.
.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>
And you're done. Hitting enter inside the box will now submit the form like someone clicked the Go! button.