共用方式為


SPFieldText.MaxLength property

取得或設定可以在欄位中輸入字元的最大數目。

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

Syntax

'宣告
Public Property MaxLength As Integer
    Get
    Set
'用途
Dim instance As SPFieldText
Dim value As Integer

value = instance.MaxLength

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

Property value

Type: System.Int32
指定的字元數上限為 32 位元整數。

備註

如果您設定MaxLength屬性,您必須呼叫Update的變更在資料庫中才會生效。

請參閱

參照

SPFieldText class

SPFieldText members

Microsoft.SharePoint namespace