System.Web.UI.WebControls.TextBox.MaxLength Property

Gets or sets the maximum number of characters allowed in the text box.

Syntax

[System.Web.UI.Themeable(false)]
[System.ComponentModel.DefaultValue(0)]
public virtual int MaxLength { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the TextBox.MaxLength property to limit the number of characters that can be entered in the System.Web.UI.WebControls.TextBox control.

Note:

This property is applicable only when the TextBox.TextMode property is set to TextBoxMode.SingleLine or TextBoxMode.Password.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0