Solved

Disable Enter Button ASP.Net

Posted on 2010-09-11
4
593 Views
Last Modified: 2012-05-10
Hi There

I have two forms on a page each form has its own asp:imagebutton and validation group.
When the user clicks enter on the keyboard it posts the first form.

How do I disable pressing enter on the keyboard and force them to use the form buttons.
0
Comment
Question by:Stanton_Roux
4 Comments
 
LVL 12

Expert Comment

by:HugoHiasl
ID: 33652556
I think this article handles what you need.:

http://www.cs.tut.fi/~jkorpela/forms/enter.html

I used it in a similar way before.
0
 
LVL 10

Expert Comment

by:krunal_shah
ID: 33652729
0
 
LVL 7

Expert Comment

by:meispisces
ID: 33653385
http://www.felgall.com/jstip43.htm

hope this helps, if not pls let me know!
0
 
LVL 9

Accepted Solution

by:
abhinayp86 earned 500 total points
ID: 33662433
a Form or an asp:panel has an attribute called DefaultButton. On on enter hit, the default button is triggered

 

.
.
.
.
.
.
.
.
 



To force ppl to click button, set the default button to some textbox or a label.

   
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question