Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetMetadataForProperty Method
Collapse the table of content
Expand the table of content

ModelMetadataProvider.GetMetadataForProperty Method

Gets metadata for the specified property.

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

public abstract ModelMetadata GetMetadataForProperty(
	Func<Object> modelAccessor,
	Type containerType,
	string propertyName
)

Parameters

modelAccessor
Type: System.Func<Object>

The model accessor.

containerType
Type: System.Type

The type of the container.

propertyName
Type: System.String

The property to get the metadata model for.

Return Value

Type: System.Web.Mvc.ModelMetadata
A ModelMetadata object for the property.
Show:
© 2015 Microsoft