Which two properties are on every validation control?
All of the validation controls inherit from the base class BaseValidator so they all have a series of properties and methods that are common to all validation controls. They are:
ControlToValidate - This value is which control the validator is applied to. ErrorMessage - This is the error message that will be displayed in the validation summary. IsValid - Boolean value for whether or not the control is valid. Validate - Method to validate the input control and update the IsValid property.
Display - This controls how the error message is shown.
Here are the possible options:
None (The validation message is never displayed.)
Static (Space for the validation message is allocated in the page layout.)
Dynamic (Space for the validation message is dynamically added to the page if validation fails.)