Share via


HtmlHelper.ValidationSummaryValidClass Property

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

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

Syntax

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

value = HtmlHelper.ValidationSummaryValidClass 

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

Property Value

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

Remarks

When you use the ValidationSummary method, ASP.NET always renders markup for the summary, even if validation passes. To control the appearance of the display (including suppressing it) when validation passes, you can define 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