ASP.NET Validation Controls

Required Field Validator <asp:requiredfieldvalidator/>

Provides form validation.Properties:    


Id=”img”
Runat=”server”
ControlToValidate=”FieldID”
Display=”Dynamic/Static”
Text=”Error Message”

Creates an unique identifier
Sets  the image for server side processing
Sets the control to be validated
Sets the validation space used by the error message
Sets the error message

Example: <asp:requiredfieldvalidator runat=”server” ControlToValidate=”CustName” Display=”Dynamic” Text=”Field Required” Font-Name=”verdana” Font-Size=”10”/>