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
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.