return keys being clicked

J

JJ

I have a createuserwizard control on my web form. When the user registration
fields are filled out correctly, and the user then presses the return key
instead of clicking the 'create user' button, the browser seems to default
to the first asp control on the web page instead of having the same effect
as clicking the create user button.

In my case the first asp control on the page is the login button, so they
end up at the login page instead of completing their registration.

I cannot set the 'default button' of the 'asp form', because the 'form' is
actually on the masterpage, so the 'default' button would change on each
page.

Is there either a way of making the default button different for each page,
or, if I have to, disabling the RETURN and ENTER keys altogether?

JJ
 
J

JJ

Ok so maybe I'm closed to a solution:

I understand that you can set the default button of the masterpage by:
Protected Sub Page_Load _
(ByVal sender As Object, _
ByVal e As System.EventArgs)
Page.Master.Page.Form.DefaultButton = _
Button2.UniqueID
End Sub


However, that brings up two issues:
1. what is the 'createuser' buttons ID (and its UniqueID?
2. what happens when you move to the next step in the wizard, and the button
changes?



Anyone reading this ?

JJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top