?
Solved

Disable Enter Button ASP.Net

Posted on 2010-09-11
4
Medium Priority
?
613 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

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 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