Tab

TextBoxPropertiesBase.MaxLength Property

Gets or sets the maximum number of characters an end user can enter into the editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue(0)]
public virtual int MaxLength { get; set; }
<DefaultValue(0)>
Public Overridable Property MaxLength As Integer

Property Value

Type Default Description
Int32

0

A positive integer specifying the maximum number of characters end users can enter. 0 to disable the length limit on the text.

Remarks

End users cannot enter strings whose length exceeds that specified by the MaxLength property. Attempts to do so will have no effect. Note that you can still assign values of any length via code. If the length of the displayed text exceeds the specified limit, end users are only able to delete characters while the number of characters is greater than the MaxLength's property value.

NOTE

The MaxLength property synchronizes its value with the editor's ASPxTextBoxBase.MaxLength property.

See Also