I've got these fields in a form that I all want validated dynamically:
<tr>
<td style="width: 20%;">User Name:</td><td style="width: 40%;">
<asp:TextBox ID="txtUserName" runat="server" TabIndex="1"></asp:TextBox></td>
<td style="width: 40%;">
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtUserName"
Display="Dynamic" ID="valUserName" runat="server" ErrorMessage="Required Field."/>
</td></tr>
<tr>
<td>First Name:</td>
<td><asp:TextBox ID="txtFirstName" runat="server" TabIndex="2"></asp:TextBox></td>
<td>
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtFirstName"
Display="Dynamic" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Required Field."/>
</td></tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox ID="txtLastName" runat="server" TabIndex="3"></asp:TextBox></td>
<td>
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtLastName"
Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Required Field."/>
</td></tr>
But it won't work. . . why ? I have another field on there that checks to see if the password fields match, and that works dynamically. . but why not these? Can anyone please help?
<tr>
<td style="width: 20%;">User Name:</td><td style="width: 40%;">
<asp:TextBox ID="txtUserName" runat="server" TabIndex="1"></asp:TextBox></td>
<td style="width: 40%;">
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtUserName"
Display="Dynamic" ID="valUserName" runat="server" ErrorMessage="Required Field."/>
</td></tr>
<tr>
<td>First Name:</td>
<td><asp:TextBox ID="txtFirstName" runat="server" TabIndex="2"></asp:TextBox></td>
<td>
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtFirstName"
Display="Dynamic" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Required Field."/>
</td></tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox ID="txtLastName" runat="server" TabIndex="3"></asp:TextBox></td>
<td>
<asp:RequiredFieldValidator InitialValue="" ControlToValidate="txtLastName"
Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Required Field."/>
</td></tr>
But it won't work. . . why ? I have another field on there that checks to see if the password fields match, and that works dynamically. . but why not these? Can anyone please help?