Latest web development tutorials

ASP.NET Validation Server Controls

Validation server controls are used to validate user input.


Validation Server Controls

Validation server controls are used to validate the data input control. If the data is not validated, an error message is displayed to the user.

Create a Validation server control syntax is:

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

Validation 服务器控件 描述
CompareValidator 把一个输入控件的值与另一个输入控件的值或一个固定的值进行对比
CustomValidator 允许您编写一个方法,来处理输入值的验证
RangeValidator 检查用户输入值是否介于两个值之间
RegularExpressionValidator 确保输入控件的值匹配指定的模式
RequiredFieldValidator 使输入控件成为必需(必填)的字段
ValidationSummary 显示网页中所有验证错误的报告