ValidationSummary control

The ValidationSummary class is used to summarize the error messages from all validators on a web page in a single location.

To add a ValidationSummary control to a page

  1. Drag the ValidationSummary control from the Toolbox task pane to your page.

  2. Select the ValidationSummary in Design view, right-click it, and click Properties on the shortcut menu.

  3. Set the ValidationGroup property to the name of the group of validation controls. This can be any string, as long as all the controls in the group have the same value.

  4. The summary can be displayed as a list, as a bulleted list, or as a single paragraph, based on the DisplayMode property. The summary can be displayed on the web page and in a message box by setting the ShowSummary and ShowMessageBox properties, respectively.

  5. For a full description of all ValidationSummary control properties, see ValidationSummary Members in the MSDN library.

  6. For more information about using validation controls to validate user input, see How-to Topics — Validation Controls in the MSDN library.

See also

Concepts

ASP.NET validation controls overview

CompareValidator control

CustomValidator control

RangeValidator control

RegularExpressionValidator control

RequiredFieldValidator control