We help IT Professionals succeed at work.

Submit button not firing on enter key press help..

sbornstein2 asked
Last Modified: 2008-01-09
Hello all this is a little tricky.  I have an ASPX page that loads a control within it.  The ASPX page holds the focus on a certain link button.  In the ASCX control I am using a CreateUserWizard and in that you set the button text etc like so:

<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" ContinueDestinationPageUrl="~/BookWork/Protected/AuthorControlPanel.aspx?FirstLogin=true"
    DisableCreatedUser="false" Font-Names="Verdana" BackColor="white" CompleteSuccessText="The account has been successfully created.  Click the continue button to begin or wait and you will be automatically redirected to your Author Control Panel in 5 seconds."
    UnknownErrorMessage="The account was not created. Please try again." OnCreatedUser="CreateUserWizard1_CreatedUser"
    CreateUserButtonText="Create New Account!" ContinueButtonStyle-CssClass="CreateUserContinueButton">

whats happening is everytime I hit submit its going to the main ASPX page button.  I tried surrounding the ascx into a panel and form but no luck.  Also I cant use defaultbutton because it does not have an id.  I have textboxes in the wizard area and then the button just creates at the bottom of it.  Any idea how I can on enter of any textbox make sure it hits this button it creates?
Watch Question

Hi There,

This is a common issue, I like to add the function call as an attribute to the control when the page is loaded, of course this all depends on the context.

There is a lot of information and code samples out there on this subject.

Hope this helps, Sean





the issue is I dont have a ID for this button its used in the CreateUserWizard as you can see above.  How can I reference this?
Unlock this solution and get a sample of our free trial.
(No credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.