Solved

Enter button causing a problem

Posted on 2009-05-13
2
213 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on Add method 1 38
Server Error 11 47
Using C#, how could you improve upon my method of writing out a merged, compressed file? 2 34
Windows Media Player 2 14
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now