Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Disable Enter Button ASP.Net

Posted on 2010-09-11
4
Medium Priority
?
622 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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 …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

610 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