MaxLengthAttributeAdapter Constructor (ModelMetadata, ModelBindingExecutionContext, MaxLengthAttribute)

 

Initializes a new instance of the MaxLengthAttributeAdapter class.

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

new : 
        metadata:ModelMetadata *
        context:ModelBindingExecutionContext *
        attribute:MaxLengthAttribute -> MaxLengthAttributeAdapter

Parameters

metadata
Type: System.Web.ModelBinding.ModelMetadata

Specifies the metadata container for a model.

context
Type: System.Web.ModelBinding.ModelBindingExecutionContext

Specifies the container for all of the information that is external to the model binding system.

attribute
Type: System.ComponentModel.DataAnnotations.MaxLengthAttribute

Specifies the maximum length of array or string data that is allowed in a property.

.NET Framework
Available since 4.6.2
Return to top
Show: