Asp. NET data validation control's common properties

Source: Internet
Author: User

One, non-null verification RequiredFieldValidator

ControlToValidate the control ID that is validated

Text of the hint when the text error occurs

ErrorMessage the error message that is submitted to ValidationSummary , which is also displayed when Text is empty

Second, the scope of the verification RangeValidator

ControlToValidate the control ID that is validated

Text of the hint when the text error occurs

Maxnumvalue maximum minnumvslue Minimum value

the type of the RangeValidator is used to set the types of validation

-------------------------------------------------------------------------------------------

Thirdly, it is worth to compare CompareValidator

ControlToValidate the control ID that is validated

Text of the hint when the text error occurs

ControlToCompare the control to be compared

ControlToValidate the control ID to validate

Type comparison type settings, different types of comparisons may be error

Operator comparison operator, default is equal to

Four, regular expression validation control RegularExpressionValidator

ControlToValidate the control ID that is validated

Text of the hint when the text error occurs

ValidationExpression Property : Sets the regular expression to match

ErrorMessage Error message

----------------------------------------------------------------------------------------------------

Custom validation Controls CustomValidator

Controltovalidator the ID of the control to validate

text with error in text

ClientValidationFunction functions for client-side validation

OnServerValidate event methods for server-side validation

-----------------------------------------------------------------------------------------------

Validation report control Validationsummaryy

The control does not validate the input to the form

It can summarize validation errors in one place and display them uniformly

What is displayed is the errormessage of other controls

ShowMessageBox, indicating whether a popup prompt message is displayed

ShowSummarythat indicates whether the report content is displayed, when the message is displayed

To avoid multiple prompt validation error messages, set the Text property of the validation control to the " * " number

Asp. NET data validation control's common properties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.