Share via

ControlToValidate Property (Common)

Sets or returns the ID of the control to validate. The default value is empty.

public string ControlToValidate {


The following is a list of the classes that inherit the ControlToValidate property from the BaseValidator class.

CompareValidator RegularExpressionValidator
CustomValidator RequiredFieldValidator


Throws an exception during pre-rendering if the ID is empty or not valid.

See Also

Applies to: BaseValidator Class