Share via


HtmlHelper.ValidationSummaryClass Property

Gets or sets the name of the CSS class that defines the appearance of a validation summary when validation fails.

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

Syntax

'Declaration
Public Shared Property ValidationSummaryClass As String 
    Get 
    Set
'Usage
Dim value As String 

value = HtmlHelper.ValidationSummaryClass 

HtmlHelper.ValidationSummaryClass = value
public static string ValidationSummaryClass { get; set; }
public:
static property String^ ValidationSummaryClass {
    String^ get ();
    void set (String^ value);
}
static member ValidationSummaryClass : string with get, set
static function get ValidationSummaryClass () : String 
static function set ValidationSummaryClass (value : String)

Property Value

Type: System.String
The name of the CSS class. The default is validation-summary-errors.

Remarks

When you use the ValidationSummary method, you can control the appearance of the message when validation fails by defining a CSS class. You can then set this property to the name of the class. At run time, the property value is set as the class attribute of the rendered markup.

See Also

Reference

HtmlHelper Class

System.Web.WebPages.Html Namespace