• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Enter button causing a problem

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
Mr_Shaw
Asked:
Mr_Shaw
1 Solution
 
ViceroyFizzlebottomCommented:
In your Form, set the DefaultButton property to the Id of the button you want fired when hitting the enter key.
0
 
Mr_ShawAuthor Commented:
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

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now