About validation controls, I hope to be helpful to my original friends (just looking for information, combined with the cat's)

Source: Internet
Author: User
Validation controls always perform validation checks in server code. However, if the user uses a browser that supports DHTML, the validation control can also use client script to perform validation. In client-side validation, any errors are detected on the client when the form is submitted to the server. If any of the validators are found to be incorrect, the form is canceled to the server and the Text property of the validator is displayed. This allows the user to correct the input before submitting the form to the server. Fields that contain errors once you lose focus, re-validate the field values, providing a rich interactive validation experience for the user.

Note that the Web Forms page framework always performs validation on the server, even if validation has been performed on the client. This helps prevent users from being able to bypass validation by simulating another user or a pre approved transaction.
You can call each validation control's IsValid (provided by the System.Web.UI.IValidator interface) after submitting the property to determine that they are not validated successfully and you can also call page. IsValid, this is actually the IsValid property of all the validation controls to be manipulated,

Client-side validation is enabled by default. If the client can, the upper level validation is performed automatically. To disable client authentication, set the page's ClientTarget property to "downlevel" ("uplevel" to enforce client-side validation).
(That is, at the top of the page: <%@ page clienttarget=uplevel%


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.