ASP.NET Tutoria...login
ASP.NET Tutorial
author:php.cn  update time:2022-04-11 14:18:18

Web Forms Validation


ASP.NET Web Forms - Validation Server Control


Validation server control is used to validate user input.


Validation Server Control

Validation Server Control is used to validate the data of the input control. If the data fails validation, an error message is displayed to the user.

The syntax for creating a Validation server control is:

<asp:control_name id="some_id" runat="server" />

Validation Server ControlDescription
CompareValidatorCompare the value of one input control with another Compare the value of the input control or a fixed value
CustomValidatorAllows you to write a method to handle the validation of the input value
RangeValidatorChecks whether the user input value is between two values
RegularExpressionValidatorEnsures that the value of the input control matches the specified Pattern
RequiredFieldValidatorMake the input control a required (required) field
ValidationSummary Shows a report of all validation errors in a web page

php.cn