开发者

Validators blocking navigation in asp.net ajax

开发者 https://www.devze.com 2022-12-22 04:57 出处:网络
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 prev

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号