ValidationHelper.ClassFor(String) Method

Definition

Renders an attribute that references the CSS style definition to use when validation messages for the user input element are rendered.

public System.Web.HtmlString ClassFor (string field);
member this.ClassFor : string -> System.Web.HtmlString
Public Function ClassFor (field As String) As HtmlString

Parameters

field
String

The name (value of the name attribute) of the user input element to validate.

Returns

The attribute.

Applies to