submit button associated to the Return Key press?

andycharger

Centurion
Joined
Apr 2, 2003
Messages
152
I am having a problem.

My users need to have the Return key associated to my submit button.

Basically there are 4 textboxes on my page. When the user presses the return key I want the page to submit.

Instead it goes off somewhere else.

How can I force the return keypress to work the SUBMIT button?

Here is my button code
Code:
<asp:button id="Button1" tabIndex="0" runat="server" Text="Submit"></asp:button>

It is within the <FORM></form> tags too.
 
OK, ive found half the problem, now I need an answer!

Basically, I have 2 <ASP:BUTTON> on my web page. One is to log people out and one is to Submit the page.

My problem is that my application is using the LOG OUT button as the page submit and not my SUBMIT button.

How can I force my page to use the SUBMIT button by default and ignore the LOGOUT one unless it is pressed? I have tried setting the tabindex higher on the logout button but that does not help.

Many thanks

Andy
 
Back
Top