Default Button in Web Page

  • Thread starter Thread starter Bob Mixon
  • Start date Start date
B

Bob Mixon

All,

This question, I hope, has a simple answer. I have a .net web page,
basically a form. Included on this form are a number of text boxes and a
few buttons. As one would expect with a form, when the focus is in a text
box and the user presses the <Enter> key, one of the buttons is pressed. In
my form, I don't want that to happen. I don't want any button to be pressed
under these circumstances. Can someone tell me how to accomplish this?

Thank you in advance for all the help!

Sincerely,
Bob
 
I tried it with the following piece of code:

Page.RegisterHiddenField("__EVENTTARGET", myButton.ClientID);

This just works fine. But if the focus is on a Radio Button it does no
longer work. Why is that?

Thank you in advance for your help!

Sincerely, Martin
 
Ken -- I used those controls last year. Very nice.

But that is not what I am wanting to do. I do not want any button to be automatically pressed when a user is in a text box, and they press the <Enter> key.

Bob
 
Back
Top