customValidator not triggered, help


J

Jeff

hi

asp.net 3.5

Here is a part of the markup for my webpage. The customValidator isn't
triggered. what am I doing wrong here?

<asp:CreateUserWizard ID="cuwNewUser"
runat="server" AutoGeneratePassword="false"
OnCreatedUser="CreatedUser" DisableCreatedUser="true"
LoginCreatedUser="false" CreateUserButtonType="Image"
FinishCompleteButtonType="Image"
FinishCompleteButtonImageUrl="~/Images/Go.gif"
CreateUserButtonImageUrl="~/Images/Go.gif" >
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"
Title="Initial step">
<ContentTemplate>

<div style="margin-left:auto; margin-right:auto; width:400px;
margin-top:50px; background-color:Olive;">
<div class="sectiontitle"
style="text-align:center;">Registration</div>
<table>
<tr>
<td style="text-align:right">User Name:</td>
<td style="width:160px;">
<asp:TextBox ID="UserName" CssClass="textbox"
runat="server" Width="100%"></asp:TextBox>

</td>
<td style="width:10px;">

<asp:CustomValidator ID="valProfileExists"
runat="server"
ErrorMessage="Username already registered"
EnableClientScript="false"
ControlToValidate="UserName"
SetFocusOnError="false" Display="Dynamic"
ValidationGroup="cuwNewUser"
OnServerValidate="ProfileExists">*</asp:CustomValidator>

<asp:RequiredFieldValidator
ID="valRequireUserName" runat="server"
ErrorMessage="Username is required"
ControlToValidate="UserName"
SetFocusOnError="false" Display="Dynamic"
ValidationGroup="cuwNewUser">*
</asp:RequiredFieldValidator>



</td>
 
Ad

Advertisements


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