Disable Enter Button ASP.Net

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.
Stanton_RouxAsked:
Who is Participating?
 
abhinayp86Connect With a Mentor Commented:
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
 
HugoHiaslCommented:
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
 
meispiscesCommented:
http://www.felgall.com/jstip43.htm

hope this helps, if not pls let me know!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.