ValidationExtensions.ValidationSummary Method
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- excludePropertyErrors
-
Type:
System.Boolean
true to have the summary display model-level errors only, or false to have the summary display all errors.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- excludePropertyErrors
-
Type:
System.Boolean
true to have the summary display model-level errors only, or false to have the summary display all errors.
- message
-
Type:
System.String
The message to display with the validation summary.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, IDictionary<String, Object>)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, IDictionary<string, object> htmlAttributes )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- excludePropertyErrors
-
Type:
System.Boolean
true to have the summary display model-level errors only, or false to have the summary display all errors.
- message
-
Type:
System.String
The message to display with the validation summary.
- htmlAttributes
-
Type:
System.Collections.Generic.IDictionary<String, Object>
A dictionary that contains the HTML attributes for the element.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, IDictionary<String, Object>, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, IDictionary<string, object> htmlAttributes, string headingTag )
Return Value
Type: System.Web.Mvc.MvcHtmlStringValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, Object)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, object htmlAttributes )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- excludePropertyErrors
-
Type:
System.Boolean
true to have the summary display model-level errors only, or false to have the summary display all errors.
- message
-
Type:
System.String
The message to display with the validation summary.
- htmlAttributes
-
Type:
System.Object
An object that contains the HTML attributes for the element.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, Object, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, object htmlAttributes, string headingTag )
Return Value
Type: System.Web.Mvc.MvcHtmlStringValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, string headingTag )
Return Value
Type: System.Web.Mvc.MvcHtmlStringValidationExtensions.ValidationSummary Method (HtmlHelper, String)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HMTL helper instance that this method extends.
- message
-
Type:
System.String
The message to display if the specified field contains an error.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, String, IDictionary<String, Object>)
Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message, IDictionary<string, object> htmlAttributes )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- message
-
Type:
System.String
The message to display if the specified field contains an error.
- htmlAttributes
-
Type:
System.Collections.Generic.IDictionary<String, Object>
A dictionary that contains the HTML attributes for the element.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, String, IDictionary<String, Object>, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message, IDictionary<string, object> htmlAttributes, string headingTag )
Return Value
Type: System.Web.Mvc.MvcHtmlStringValidationExtensions.ValidationSummary Method (HtmlHelper, String, Object)
Returns an unordered list (ul element) of validation messages in the ModelStateDictionary object.
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message, object htmlAttributes )
Parameters
- htmlHelper
-
Type:
System.Web.Mvc.HtmlHelper
The HTML helper instance that this method extends.
- message
-
Type:
System.String
The message to display if the specified field contains an error.
- htmlAttributes
-
Type:
System.Object
An object that contains the HTML attributes for the element.
Return Value
Type: System.Web.Mvc.MvcHtmlStringA string that contains an unordered list (ul element) of validation messages.
The ValidationSummary method displays a list of all validation messages on the page.
If the DefaultModelBinder instance cannot bind a form-field value to the model, the binder adds an error to the ModelState object. When the view is rendered, the validation messages and validation summary are displayed based on the Errors property of the ModelState object.
ValidationExtensions.ValidationSummary Method (HtmlHelper, String, Object, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message, object htmlAttributes, string headingTag )
Return Value
Type: System.Web.Mvc.MvcHtmlStringValidationExtensions.ValidationSummary Method (HtmlHelper, String, String)
public static MvcHtmlString ValidationSummary( this HtmlHelper htmlHelper, string message, string headingTag )

