469,610 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

disable enter key

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
2 2748
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
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.

Similar topics

5 posts views Thread by http://links.i6networks.com | last post: by
1 post views Thread by Stephen | last post: by
1 post views Thread by John Smith | last post: by
8 posts views Thread by alamodgal | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.