System.Web.UI.HtmlControls Namespace HtmlInputText Class
Sets or retrieves the maximum number of characters that can be entered into the text box.
Inline |
<input type= [ text | password ] maxlength = intMax ... > |
Script |
HtmlInputText.MaxLength [ = intMax ] |
intMax |
Integer specifying the maximum number of characters. |
The property is read/write with no default value.
Use the MaxLength property to specify or determine the maximum number of characters that can be entered in the text box.
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
HtmlInputText Members Size