开发者

vb.net 2008 textbox max length

What is the maxi开发者_高级运维mum amount of characters that can be put into a textbox in vb.net 2008?


Assuming Windows Forms:

TextBox.MaxLength

You can use this property to restrict the length of text entered in the control for values such as postal codes and telephone numbers. You can also use this property to restrict the length of text entered when the data is to be stored in a database so that the text entered into the control does not exceed the maximum length of the corresponding field in the database.

This property does not affect characters that are added programmatically.

When this property is set to 0, the maximum length of the text that can be entered in the control is limited only by available memory.


(But it's not a good idea to put so much data into a textbox that it fills all available memory. If you have that much data, you will need a different user interface. The TextBox was not designed for easily viewing/editing such large amounts of data.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜