bemara57
asked on
How do I validate multiple controls with the same Validator?
I have a validator like the one below. Right now it's only validating one control, but there are many controls on the page with the same validation criteria. How do I assign it to multiple controls? Do I really need to duplicate the validator?
<asp:RegularExpressionVali dator ID="RegularExpressionValid ator1" runat="server"
ErrorMessage="Only alphanumeric values are allowed for page names."
Display="None"
ControlToValidate="TextBox CreatePage "
ValidationExpression="^[a- zA-Z][a-zA -Z0-9_]+$"
SetFocusOnError="True" />
<asp:RegularExpressionVali
ErrorMessage="Only alphanumeric values are allowed for page names."
Display="None"
ControlToValidate="TextBox
ValidationExpression="^[a-
SetFocusOnError="True" />
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.