Enable/Disable asp:validators using jquery

后端 未结 4 995
Happy的楠姐
Happy的楠姐 2020-12-08 22:43

I am working with a wizard, where the user can sign up. There is a asp:RadioButtonList with two options, and some of the input fields in the wizard changes when the radiobut

4条回答
  •  悲哀的现实
    2020-12-08 23:32

    I found a better option was to use simply:

    document.getElementById("<%=myValidator.ClientID %>").enabled = true;
    

    The ValidatorEnabled option as suggested above automatically calls the validation of the linked control and in my case shows the error message "please enter a value for seller name" which wasn't necessary or desired..

    Using the ".enabled = true" option doesn't.

提交回复
热议问题