(1) namespace System.Web.UI
(2) {
(3) public class BaseValidator: Label, IValidator
(4) {
(5) // Properties
(6) public String ControlToValidate {get; set;}
(7) public Boolean IsValid {get; set;}
(8) public String ErrorMessage {get; set;}
(9) public ValidatorDisplay Display {get; set;}
(10) public String Text {get; set;}
(11) Public Boolean EnableClientScript {get; set;} (12)
(13) //Methods
(14) public void Validate();
(15) } (16)
(17) public enum ValidatorDisplay
(18) {
(19) None = 0; // Validator is always invisible; used when the error
(20) // message is only shown in a ValidationSummary
(21) Static = 1;' // Validator takes up space even when hidden
(22) Dynamic = 2; // Validator takes up space only when visible
(23) }
(24) }