Export (0) Print
Expand All

ValidationExtensions.ValidationSummary Method

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.

  NameDescription
Public method Static member ValidationSummary(HtmlHelper) Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
Public method Static member ValidationSummary(HtmlHelper, String) Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
Public method Static member ValidationSummary(HtmlHelper, String, IDictionary<String, Object>) Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
Public method Static member ValidationSummary(HtmlHelper, String, Object) Returns an unordered list (ul element) of validation messages in the ModelStateDictionary object.
Top

The ValidationMessage method displays a list of all validation messages on the page.

If the DefaultModelBinder instance cannot bind a form-field value to the model, it adds an error to the ModelState object. When the form is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.

Community Additions

Show:
© 2015 Microsoft