473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2920
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: http://links.i6networks.com | last post by:
I want to force the users to click submit to submit the forms. How do I disable "Enter Key" which will submit the form automatically when they entered the data in text field then pressed "enter key"
3
by: James P. | last post by:
Hello, How do I disable the Enter key so that it does not generate a new blank form when I hit the Enter key? I tried Tools - Options - KeyBoard: select "Don't Move" in "Move After Enter"...
1
by: Stephen | last post by:
Hi, How do I disable the enter key for a "Form"? so that user has to click the "Submit" button. Is there a way of doing it other than using Java/VB script? Thanks, Stephen
1
by: John Smith | last post by:
Hi, How can I disable enterkey in a form. I have using couple of asp textboxes, one asp button for search and two Image Buttons, one for Back and other for continue. But If I click on the text...
13
by: Rich | last post by:
Hello, So I would like to disable a textbox on a vb.net form without the text getting grayed out. In vb6 I could place a textbox control on a frame control and disable the frame leaving the...
1
by: Daren Hawes | last post by:
Hi, I have a ASP.NET 1.1 page that in top corner has a login box & button. Then a large form. Users can fill out the form and press enter, but it actually submits the login not the one I...
0
by: joe | last post by:
How to disable imagebutton postback when i enter "enter" i just want postback when click mouse
16
by: nagmvs | last post by:
Hi, Can any one tell me How to disable Keyboard Functions using JavaScript.If knows please tell me the code.Also tell me the code for mouse disable also. Thanks, Nagesh.
8
by: alamodgal | last post by:
hiiiiiiiiiii everybody, pls solve my problem if u can? Actualy what happens in my site when i press enter key it will show some secured...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.