Export (0) Print
Expand All

ModelMetadata.GetDisplayName Method

Gets the display name for the model.

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

'Declaration
Public Function GetDisplayName As String
'Usage
Dim instance As ModelMetadata 
Dim returnValue As String 

returnValue = instance.GetDisplayName()

Return Value

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

If the DisplayName property is not Nothing, the DisplayName property is returned. If the DisplayName property is Nothing, and the PropertyName property is not Nothing, the PropertyName property is returned. If the DisplayName property is null and the PropertyName property is Nothing, the ModelType name is returned.

Show:
© 2014 Microsoft