SPFieldText.MaxLength property

Gets or sets the maximum number of characters that can be typed in the field.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property MaxLength As Integer
    Get
    Set
'Usage
Dim instance As SPFieldText
Dim value As Integer

value = instance.MaxLength

instance.MaxLength = value
public int MaxLength { get; set; }

Property value

Type: System.Int32
A 32-bit integer that specifies the maximum number of characters.

Remarks

If you set the MaxLength property, you must call the Update for changes to take effect in the database.

See also

Reference

SPFieldText class

SPFieldText members

Microsoft.SharePoint namespace