Home  |  Contact us    
Common Properties of Validation Controls


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.)


Category: ASP.NET Faqs, Interview Questions & Answers



Ask New Questions
Microsoft.Net Framework
.Net 2.0 Namespaces
.Net Assemblies
OOPS Faqs in C#
ASP.Net Faqs
ASP.Net 2.0 Faqs
Web Services Faqs
ADO.Net Faqs
Database Faqs
OOPS Faqs
IT Project Management