TextBox.MaxLength Propriedade

Definição

Obtém ou define o número máximo de caracteres permitidos na caixa de texto.Gets or sets the maximum number of characters allowed in the text box. O valor padrão é 0, o que significa que não há limite de comprimento.The default value is 0, meaning that there is no limit on the length. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).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

Valor da propriedade

Int32

O número máximo de caracteres permitidos na caixa de texto.The maximum number of characters allowed in the text box.

Atributos

Exceções

O valor é menor que zero.The value is less than zero.

Aplica-se a