Disable some ASP.Net validation controls when a checkbox is checked

后端 未结 3 610
挽巷
挽巷 2021-02-06 01:25

I\'m using old fashioned ASP.NET validation (ugh) for a checkout process. I have a checkbox -\"I\'ll call with my credit card details\"-. If checked I need to disable the requir

3条回答
  •  醉酒成梦
    2021-02-06 01:57

    If you're disabling server side then you can do

    button1.CausesValidation = False
    

    in your CheckChangedEvent this is more helpful if you have a lot of validators and need to disable them all.

提交回复
热议问题