Disable Validator

Discussion in '.NET' started by Karuppusamy, Aug 24, 2011.

  1. Karuppusamy

    Karuppusamy

    Joined:
    Aug 24, 2011
    Messages:
    1
    Likes Received:
    0
    I set validator.enabled=false and validator.isvalid=false in client side.but when i check Validator.IsValid in Server side it return false.

    what is the command that disable Validator in Client Side and Server Side?
     
    Last edited: Aug 24, 2011
    Karuppusamy, Aug 24, 2011
    #1
    1. Advertisements

  2. Karuppusamy

    Parth_Munjpara

    Joined:
    Jan 22, 2020
    Messages:
    7
    Likes Received:
    0
    //To enable/disable all validators of a validation group
    //server side
    foreach (BaseValidator val in Page.Validators)
    {
    if (val.ValidationGroup == "LoginUserValidationGroup")
    {
    val.Enabled = false;
    }
    }
    // client side
    for (i = 0; i < Page_Validators.length; i++) {
    if (Page_Validators.validationGroup == "LoginUserValidationGroup") {
    ValidatorEnable(Page_Validators, false);
    }
    }
     
    Parth_Munjpara, Feb 20, 2020
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.