Introduction to the RequiredFieldValidator Control
Use thecontrol to validate that the user entered a data value into a or control. With a SelectionList control, the user must select an item in the list. With a TextBox control, the user must enter a value.
Set the RequiredFieldValidator control'sproperty to the ID of the SelectionList or TextBox control to validate. If the data value is not present, the RequiredFieldValidator control displays the value of its property.
When you add a RequiredFieldValidator control to a container control or template:
The ErrorMessage property is set to "RequiredFieldValidator".
Theproperty is set to error, which is the name of a predefined style in the default object.
For detailed information about properties of this control, see the Properties section of the RequiredFieldValidator topic.