HtmlHelper.ValidationMessage Method
Returns an HTML span element that represents a validation error message for use in a web page.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
ValidationMessage(String) | Returns an HTML span element that contains the first validation error message for the specified form field. |
|
ValidationMessage(String, IDictionary<String, Object>) | Returns an HTML span element that has the specified custom attributes defined by an attribute dictionary, and that contains the first validation error message for the specified form field. |
|
ValidationMessage(String, Object) | Returns an HTML span element that has the specified custom attributes defined by an attribute object, and that contains the first validation error message for the specified form field. |
|
ValidationMessage(String, String) | Returns an HTML span element that contains a validation error message for the specified form field. |
|
ValidationMessage(String, String, IDictionary<String, Object>) | Returns an HTML span element that has the specified custom attributes defined by an attribute dictionary, and that contains a validation error message for the specified form field. |
|
ValidationMessage(String, String, Object) | Returns an HTML span element that has the specified custom attributes defined by an attribute object, and that contains a validation error message for the specified form field. |
This method is used in conjunction with the System.Web.Helpers.Validation class.
The HTML span element is returned as HTML markup that can be used to render the validation error message in a web page.
Show: