Solved

Enter button causing a problem

Posted on 2009-05-13
2
234 Views
Last Modified: 2013-12-17
I have two buttons and a text box on my page.

The first button takes the user to the home page.

The text box records a value

and the second button submits the value to the database.

When I log onto the page and type a value in the text box and then press enter I get taken back to the home page. This is not what I want to happen.

I thought it was something to do with the tab order. so I change the tab order on the home page button to 2, the textbox to 0 and the submit button to 1.

When I press enter I still get taken back to the home page.

Can anybody help?
0
Comment
Question by:Mr_Shaw
[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
2 Comments
 
LVL 6

Accepted Solution

by:
ViceroyFizzlebottom earned 500 total points
ID: 24376838
In your Form, set the DefaultButton property to the Id of the button you want fired when hitting the enter key.
0
 

Author Closing Comment

by:Mr_Shaw
ID: 31581078
Thanks worked...

Do you think you could help me on my other question.

http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_24405521.html
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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