In the next example, I will show you a small example of how it can be used.As you see, we only use one validator to validate the two fields.
you need to disable password’s requiredfield validator on checkbox true, then validate and check Page. Alternatively, you can override Validate method and enable/disable validator in the method.It might seem a bit overwhelming, but it's actually quite simple.Like with the Required Field Validator, we use the controltovalidate attribute to specify which control to validate.Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without modification on a machine with the . We use Java Script to do the Client-Side Validation. There are the following two types of validation in ASP.This is a very basic and that useful example, only made to show you how you may use the Custom Validator.