Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tie button to "Enter" via CreateUserWizard

Status
Not open for further replies.

lawlegacy

IS-IT--Management
Jun 5, 2006
53
0
0
US
I have two buttons on my webpage. Everytime I hit the enter key it always goes to the other button. My question is how do I tie the fields in CreateUserWizard to its button.
 
I'm not sure, but perhaps you can change the tab index of the button to a higher value. Or I just came across this...

So, how do you set a default button to be clicked when the user presses Enter? Simply add the following line to your page's Load event, replacing "btnSearch" with the name of your button. It uses a hidden Page method called RegisterHiddenField and works splendidly:

Page.RegisterHiddenField("__EVENTTARGET", "btnSearch")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top