TextBox.MaxLength Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum number of characters allowed in the text box. The default value is 0, meaning that there is no limit on the length. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public:
property int MaxLength { int get(); void set(int value); };
[System.ComponentModel.Bindable(true)]
public int MaxLength { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.MaxLength : int with get, set
Public Property MaxLength As Integer
Property Value
The maximum number of characters allowed in the text box.
- Attributes
Exceptions
The value is less than zero.
Applies to
See also
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.