Validators inside a CreateUserWizard on a content page

  • Thread starter Thread starter Steven
  • Start date Start date
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
 
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.
 
Back
Top