다음을 통해 공유


How to: Add and Configure a ValidationSummary Control 

Use the ValidationSummary control to display a list of validation errors that occurred when a form was submitted. This control lists all the error messages generated by the other validation controls on the form. The ValidationSummary control obtains the error message strings from the ErrorMessage properties of the validation controls whose tests failed.

To display a summary of error messages

  1. Drag a ValidationSummary control to the form on which to display the error messages. Place the ValidationSummary control where you want to display the collected error messages on a target device.

  2. In the Properties window, set the FormToValidate property to the ID of the form for which you want to summarize error messages.

  3. Optionally, type header text to precede the error messages in the HeaderText property.

  4. Optionally, enter text for the back link in the BackLabel property.

    The ValidationSummary control displays this link so that users can return to the form on which the error occurred and reenter data.

See Also

Tasks

How to: Add and Configure a CompareValidator Control
How to: Add and Configure a CustomValidator Control
How to: Add and Configure a RangeValidator Control
How to: Add and Configure a RegularExpressionValidator Control
How to: Add and Configure a RequiredFieldValidator Control

Reference

ValidationSummary

Concepts

Introduction to the Validation Controls