ErrorMessage Property (Common)
Sets or returns the text that will be used for the error message. The default value is empty.
public string ErrorMessage {
get,
set
}
Inheritance
The following is a list of the classes that inherit the ErrorMessage property from the BaseValidator class.
CompareValidator | RegularExpressionValidator |
CustomValidator | RequiredFieldValidator |
RangeValidator |
Remarks
This property is used in two ways. First, if there is no value for the Text property, the value of the ErrorMessage property is used in its place. Second, when the ValidationSummary control is used, the summary uses the value of the ErrorMessage property for each validator that represents an invalid control.
See Also
Applies to: BaseValidator Class