Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET TextBox MaxLength Property

ASP.NET TextBox MaxLength Property


TextBox control TextBox Control


Definition and Usage

The MaxLength property is used to set or return the maximum number of characters allowed in the TextBox control.

Syntax

/>

 

property Description
num A numeric value that specifies the maximum number of characters allowed in the text box.

Example

The following example sets the maximum number of characters allowed in a TextBox control:

Demo Example »


TextBox control TextBox Control