asp.net.ph

HtmlInputText.MaxLength Property

System.Web.UI.HtmlControls Namespace   HtmlInputText Class


Sets or retrieves the maximum number of characters that can be entered into the text box.

Syntax


Inline <input type= [ text | password ] maxlength = intMax ... >
Script HtmlInputText.MaxLength [ = intMax ]

Property Value


intMax Integer specifying the maximum number of characters.

The property is read/write with no default value.

Remarks

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

Example

The below code shows how to declaratively set the MaxLength property to limit the number of characters the text box may contain.

<input type=password id="password" maxlength=10 runat="server"/>

 Show me 

See Also

HtmlInputText Members   Size Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note