Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ValidationSummary Method

ValidationExtensions.ValidationSummary Method

 

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

Namespace:   System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper)

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

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, Boolean)

Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object and optionally displays only model-level errors.

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(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.

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(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.

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, Boolean, String, IDictionary<String, Object>, String)

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(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.

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, Boolean, String, Object, String)

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, Boolean, String, String)

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String)

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

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String, IDictionary<String, Object>)

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

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String, IDictionary<String, Object>, String)

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String, Object)

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

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String, Object, String)

System_CAPS_pubmethodSystem_CAPS_staticValidationSummary(HtmlHelper, String, String)

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.

Return to top

ValidationExtensions.ValidationSummary Method (HtmlHelper)

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

public static MvcHtmlString ValidationSummary(
	this HtmlHelper htmlHelper
)

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

Return Value

Type: System.Web.Mvc.MvcHtmlString

A 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.

Return to top

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.MvcHtmlString

A 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.

Return to top

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.MvcHtmlString

A 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.

Return to top

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<stringobject> 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<StringObject>

A dictionary that contains the HTML attributes for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

A 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.

Return to top

ValidationExtensions.ValidationSummary Method (HtmlHelper, Boolean, String, IDictionary<String, Object>, String)

public static MvcHtmlString ValidationSummary(
	this HtmlHelper htmlHelper,
	bool excludePropertyErrors,
	string message,
	IDictionary<stringobject> htmlAttributes,
	string headingTag
)

Return Value

Type: System.Web.Mvc.MvcHtmlString
Return to top

ValidationExtensions.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.MvcHtmlString

A 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.

Return to top

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.MvcHtmlString
Return to top

ValidationExtensions.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.MvcHtmlString
Return to top

ValidationExtensions.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.MvcHtmlString

A 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.

Return to top

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<stringobject> 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<StringObject>

A dictionary that contains the HTML attributes for the element.

Return Value

Type: System.Web.Mvc.MvcHtmlString

A 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.

Return to top

ValidationExtensions.ValidationSummary Method (HtmlHelper, String, IDictionary<String, Object>, String)

public static MvcHtmlString ValidationSummary(
	this HtmlHelper htmlHelper,
	string message,
	IDictionary<stringobject> htmlAttributes,
	string headingTag
)

Return Value

Type: System.Web.Mvc.MvcHtmlString
Return to top

ValidationExtensions.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.MvcHtmlString

A 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.

Return to top

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.MvcHtmlString
Return to top

ValidationExtensions.ValidationSummary Method (HtmlHelper, String, String)

public static MvcHtmlString ValidationSummary(
	this HtmlHelper htmlHelper,
	string message,
	string headingTag
)

Return Value

Type: System.Web.Mvc.MvcHtmlString
Return to top
Show:
© 2015 Microsoft