Freigeben über


ModelMetadata.GetDisplayName Method

Gets the display name for the model.

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

Syntax

'Declaration
Public Function GetDisplayName As String
public string GetDisplayName()
public:
String^ GetDisplayName()

Return Value

Type: System.String
The display name for the model.

Remarks

If the DisplayName property is not null reference (Nothing in Visual Basic), the DisplayName property is returned. If the DisplayName property is null reference (Nothing in Visual Basic), and the PropertyName property is not null reference (Nothing in Visual Basic), the PropertyName property is returned. If the DisplayName property is null and the PropertyName property is null reference (Nothing in Visual Basic), the ModelType name is returned.

See Also

Reference

ModelMetadata Class

System.Web.Mvc Namespace