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

x
?
Solved

Enter button causing a problem

Posted on 2009-05-13
2
Medium Priority
?
254 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

636 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