HtmlInputText::MaxLength Property

 

Gets or sets the maximum number of characters that can be entered in the text box.

Namespace:   System.Web.UI.HtmlControls
Assembly:  System.Web (in System.Web.dll)

public:
property int MaxLength {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The maximum number of characters that can be entered in the text box.

Use the MaxLength property to specify or determine the maximum number of characters that can be entered in the text box.

The following code example demonstrates how to use the MaxLength property to specify the maximum number of characters that can be entered in the text box.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: