Solved

Enter button causing a problem

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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 video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

18 Experts available now in Live!

Get 1:1 Help Now