I am encountering issues in the navigation defined in a master page which are being blocked by validators pages that inherit from the master. How can I disable these validators so that they do not prevent my button actions in the 开发者_C百科master page?
I am using AJAX controls in child pages.
You should break your controls into validation groups. Without any validation groups, any button triggers validation (that are not set to "CausesValidation=false") as all the controls are considered in the same group. You want to group the validators, controls being validated and buttons that should trigger validation in the same group. That way, when a button not in the validation group will be unaffected by any validations.
you can use the
CausesValidation="false"
on the controls that you do not won to take part on your validaion, or create
ValidationGroup="MyGroupName"
Validate Groups that the one not affect the other group.
精彩评论