The textbox of C # has the maximum character length limit by default.

Source: Internet
Author: User

I accidentally thought it was the limitation of the previous Windows Control. I checked that msdn was actually restricted by C # (. NET.

"

Attribute Value

Type: System..::.Int32

The number of characters that can be entered in the text box control. The default value is 32767.

Exception
Exception Condition
Argumentoutofrangeexception

The assigned attribute value is less than zero.

Remarks

You can use this property to limit the length of text entered in the control for values such as ZIP codes and phone numbers, it can also be used to limit the length of the text to be input in the database. You can restrict the text entered into the control to the maximum length of the corresponding fields in the database.

Note:

InCodeYou can set the value of the text attribute to a length greaterMaxlengthThe value of the value specified by the property. This attribute only affects the text entered into the control at runtime.

Windows NT 4.0, Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 platform description:

For single-line text box controlsMaxlengthIf the attribute is set to 0, you can enter a maximum of 2147483646 characters or a memory-based number. For the multi-line text box control, you can enter a maximum of 4294967295 characters or a number based on available memory.

Windows Millennium Edition platform description:

For single-line text box controlsMaxlengthIf the attribute is set to 0, you can enter a maximum of 32,766 characters or a memory-based number. For the multi-line text box control, you can enter a maximum of 65,535 characters or a number based on available memory.

"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.