다음을 통해 공유


AssetUrlSelector.MaxLength Property

Gets or sets the maximum character length for the asset URL text box.

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

Syntax

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

value = instance.MaxLength

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

Property Value

Type: System.Int32
Defaults to a value of 0, which indicates unlimited character length.
The maximum character length for the Asset URL text box or 0 to indicate no limit.

Remarks

When this property value is set to a value greater than 0, the HTML input text box does not allow input greater than the specified character length and the posted value is validated to ensure that it does not exceed that length. This property has no effect if the AssetUrlTextBoxVisible property is set to false.

Examples

// These values control the appearance of the text box
// and button for the control.
private const int SampleMaxLength = 100;
// Set values for the behavior and validation// for the text box.assetSelector.MaxLength = SampleMaxLength;
' These values control the appearance of the text box
' and button for the control.
Private Const SampleMaxLength As Integer = 100

' Set values for the behavior and validation
' for the text box.
assetSelector.MaxLength = SampleMaxLength

See Also

Reference

AssetUrlSelector Class

AssetUrlSelector Members

Microsoft.SharePoint.Publishing.WebControls Namespace

AssetUrlSelector