Disable ASP. NET Server Control Verification

Source: Internet
Author: User

 

Under certain conditions, you may need to avoid verification. For example, if there is a "cancel" button or a navigation button on the page, you can send the page even if the user does not enter all the verification fields correctly. You can set an ASP. NET Server Control to avoid client and server verification, not just client verification.

Disable server and client Verification

You can specify a separate control on the Web forms page to send back without triggering a verification check.

Avoid verification for specific controls

  • SetCausesValidationSet propertyFalse.

    The following example shows how to create the cancel button so that verification checks are not performed:

    <Asp: Button id = "Button1" runat = "server"
    Text = "Cancel" CausesValidation = "False">
    </Asp: Button>

You can also disable the verification control so that it is not displayed on the page at all and does not use the verification control.

Disable verification controls

  • VerifyEnabledSet propertyFalse.
Disable client verification only

If you want to perform verification on the server without performing client verification, you can set the independent verification control to not generate client scripts. This is especially useful if dynamic updates on the client cause page layout problems, or if you want to execute some server code before verification.

Disable client Verification

  • VerifyEnableClientScriptSet propertyFalse.
Related Article

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.