MaxChars Property

            Applies To

Specifies the maximum number of characters that the user is allowed to type into a text box. Available at design time.

Remarks

The maximum number of characters only affects the number of characters that the user is allowed to type. It does not limit the number of characters of the default value.

For example, if the MaxCharacters property is set to 5, and the initial value of the text box is Enter your ID, all the letters in Enter your ID would be displayed on the initial load of the page.

This property is mapped to the Max Characters box on the General Tab of the Textbox Properties dialog box.