Reputation: 183
Now i have two buttons that contain attributes "ValidationGroup='Group1'".And there will only one button can be displayed when page load(based on some conditions).the problem is the onclick event can't be fired for the hidden button's validation. So how can i disable the validation group of the hidden buttons in backstage?
Upvotes: 0
Views: 226
Reputation: 364
My tip would be to use two separate validation groups, one for each button and then just disable the correct group by ValidationGroup1.Enabled = false;
Upvotes: 1
Reputation: 17614
You can use CauseValidation
proppery to overcome this issue as follows on your hidden button
CausesValidation="False"
Upvotes: 0