Validators inside a CreateUserWizard on a content page

S

Steven

I customized a createuserwizard, in the CreateUserWizardStep
I added custom fields like:

<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1"
runat="server">
<ContentTemplate>
<div>
<div>First Name</div>
<div>
<asp:TextBox ID="txtFirstName"
Width="148px"
MaxLength="50"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="FirstNameRequired"
ControlToValidate="txtFirstname"
runat="server"
ValidationGroup="CreateUser"
ErrorMessage="First name is a required
field."
SetFocusOnError="True"
ToolTip="First name is a required field"
Text="*"></asp:RequiredFieldValidator>
</div>
<div>
....

Above the wizard I added something like this:

<div><asp:ValidationSummary ID="ValidationSummary1"
runat="server" EnableClientScript="true" ValidationGroup="CreateUser" />
</div>

I've tried changing the ValidationGroup to the name of the UniqueID of the
wizard
and various other things, but when I submit the page empty, it posts back
and
doesn't give me any error messages, and I have EnableClientSideScript set to
true. (A few pages I read said to set the ValidationGroup to the wizard
id).

I've tried the ValidationSummary inside and out of the wizard.

Any ideas or suggestions?

Steven
 
S

Steven

I found the answer, it was to just set the ValidationGroup to
my ID raw, without ClientID or UniqueID:
ValidationGroup="CreateUserWizardStep1" on the page itself.
Do it for the validators and the summary.
 

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