MetaColumn.MaxLength Property

 

Gets a value that indicates the maximum length of data that can be stored in the data field.

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

public int MaxLength { get; }

Property Value

Type: System.Int32

The maximum length of data that can be stored in the data field.

The MaxLength property verifies if a StringLengthAttribute attribute is applied to the data field and retrieves the value of the MaximumLength property. If a StringLengthAttribute attribute is not applied to the data field, the MaxLength property uses the database type to retrieve the maximum length allowed.

.NET Framework
Available since 3.5
Return to top
Show: