Disabling the return key while within a dialog box

K

King Coffee

Hi,

I have an asp:hyerLink control followed by an asp:Login control. If I
inadvertently press the return key while within the login control... the
asp.net page will perform the hyperlink and branch out of the login control
dialog box. So, How can I disable the return key within the login box, or
any other remedy?

King
 
K

King Coffee

PS: I also have button on the master.page with a similar page call like the
asp:HyperLink.

King
 
M

Michael Nemtsev [MVP]

Hello King,

What's you DefaultButton settings for login contol?! Seems that you have
this attribute set and that's why enter submit your form

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour
:: http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


KC> PS: I also have button on the master.page with a similar page call
KC> like the asp:HyperLink.
KC>
KC> King
KC>
KC> KC>
 
K

King Coffee

Thank You, your comment helped a lot. I change the button on the master.page
to "usesubmitbehavoir" to false... and it stop executing that button when I
press the enter key.

Once again, Thanks,
King

Michael Nemtsev said:
Hello King,

What's you DefaultButton settings for login contol?! Seems that you have
this attribute set and that's why enter submit your form

---
WBR, Michael Nemtsev [Microsoft MVP] :: blog:
http://spaces.live.com/laflour :: http://twitter.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

KC> PS: I also have button on the master.page with a similar page call
KC> like the asp:HyperLink.
KC> KC> King
KC> KC>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top