By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,761 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,761 IT Pros & Developers. It's quick & easy.

disable enter key

P: n/a
How can I disable the enter key on an asp.net page?

As the default button is the first on the page,
and as the enter key clicks the default button,
and as my first button on the page is th 'logou' button
=> when I have a search form for example and my users press ENTER instead of
clicking on the button, they are logged out instead of transferred to the
search results.

So, I would like to disable the ENTER key...unless sombody has a better
idea.

THX !
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Take a look at this:
http://www.allasp.net/enterkey.aspx
"nicholas" <mu********@hotmail.com> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
How can I disable the enter key on an asp.net page?

As the default button is the first on the page,
and as the enter key clicks the default button,
and as my first button on the page is th 'logou' button
=> when I have a search form for example and my users press ENTER instead of clicking on the button, they are logged out instead of transferred to the
search results.

So, I would like to disable the ENTER key...unless sombody has a better
idea.

THX !

Nov 18 '05 #2

P: n/a
THX a lot.

I also found another solution: use asp:linkbutton instead of asp:button

Ciao,
Nic

"Karl" <none> wrote in message news:uZ**************@TK2MSFTNGP10.phx.gbl...
Take a look at this:
http://www.allasp.net/enterkey.aspx
"nicholas" <mu********@hotmail.com> wrote in message
news:Ov**************@TK2MSFTNGP12.phx.gbl...
How can I disable the enter key on an asp.net page?

As the default button is the first on the page,
and as the enter key clicks the default button,
and as my first button on the page is th 'logou' button
=> when I have a search form for example and my users press ENTER instead
of
clicking on the button, they are logged out instead of transferred to

the search results.

So, I would like to disable the ENTER key...unless sombody has a better
idea.

THX !


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.