I have two validation groups and two validation summaries on my page. Controls belong to either of two groups and there is a button for each group that performs the validation for each.
I can't get Page.IsValid
to work; it always returns true regardless of the validity of the controls on the page. Is there a different way to validate only particular groups?
Best Answer
Try performing
Page.Validate
before you checkPage.IsValid
like:Where
"ValidationGroup"
is the name of your validation group. If you use thePage.Validate()
method without a group name parameter the validation groups are ignored and all controls are validated.