Sometime we need to disable page validator based on user selection. For example in the following image when user click the save button the three validators are used for client side validation.
Now if user clicks on Reset Password then we don't need to disable the client side validators related to the three fileds (old password, password, confirm password). To enable/disable validators we need to use asp.net provided client side method:
Pretty simple! huh!
if(ResetPassword Chekcbox is checked)
1. disable validator related to old password.
2. disable validator related to password.
3. Disable validator related to confirm password
Now when you'll call the page.Isavalid, you'll get the true as the call of page.isvalid will ignore those controls' that are not enabled. So if you disable a validator from server side then page.Isavalid will ignore whether the validator we validated or not on the client side.