Wrong Form Submit

From: P1ayboy (P1ayboy_at_discussions.microsoft.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 07:45:06 -0800

I have two forms on a page, one for logging in a user and a second one to
search thesite. The problem is, when i enter data into the search and hit
enter, it activates the login button. I need to know how to associate a
textbox with a particular button.

<asp:TextBox ID="keyword" Runat=server ></asp:TextBox>
<asp:imagebutton OnCommand="runSearch" id="runbutton" Runat=server />

so when the focus is on keyword and I hit enter, it will run "runSearch" and
not other command on other buttons.

Cheers

Rob