ModelMetadata.DisplayName Property

 

Gets or sets the display name of the model.

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

Syntax

public virtual string DisplayName { get; set; }
public:
property String^ DisplayName {
    virtual String^ get();
    virtual void set(String^ value);
}
abstract DisplayName : string with get, set
override DisplayName : string with get, set
Public Overridable Property DisplayName As String

Property Value

Type: System.String

The display name of the model.

Remarks

This property is used in the LabelFor<TModel, TValue> method to generate the label text.

See Also

ModelMetadata Class
System.Web.Mvc Namespace

Return to top