다음을 통해 공유


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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.MaxValue, Value := )> _
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.MinValue, Value := )> _
<ClientCallableAttribute> _
Public Property MaxLength As Integer
    Get
    Set
'Usage
Dim instance As SPFieldText
Dim value As Integer

value = instance.MaxLength

instance.MaxLength = value
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.MaxValue, Value = )]
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.MinValue, Value = )]
[ClientCallableAttribute]
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