|
Validation Groups Support:
|
|
|

New York
Paris
London
Oslo
Sofia
Liverpool
Seattle
San Francisco
Boston
Miami
Denver
Dallas
Madrid
Barcelona
Amsterdam
Moscow
Brussels
Bonn
Dublin
St.Paul
|
|
Source Code & Description
Validation Groups - You can assign a group name to a set of validators to ensure that validation occurs only for
controls in the specified group. This enables you to have multiple separately-validated forms on a single page.
The ValidationGroup property is used when want to perform separate validation scenarios on the same page. Set the group name on
validator controls and on the button that causes validation. By default all validators are in the "" group (default group), for backward
compatibility. Page also exposes GetValidators("group") method and Validate("group") method. Page.IsValid reflects validity of all controls
(cumulative) that have had Validate called.
In this example validators (RequiredFieldValidator) are set for all textboxes, but when you postback from the ComboBox only the
first textbox is validated because the ComboBox is set to validate only ComboBoxValidatorGroup