Click here to Skip to main content
15,913,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to override textbox's maxlength Properties for longer(>32767) characters to store.such as 10000000.thank you.
Posted

Are you certifiably insane?

It's the only reason I can think of for even considering trying to put 32K characters into a textbox, much less 10,000,000.
Do you seriously expect the poor sod of a user to either a) read or b) type that much?

What are you trying to achieve with such an idea?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Jun-11 17:20pm    
Good point, tough post though. A 5.
--SA
(1) Max Length never affects what a program can put in a text box, it only
affects what a user can type into the text box. So if you're running into a
limit, the limit is coming from somewhere else.

(2) I think a rich edit box has a larger limit than an ordinary edit box.
If your text box is an edit box, try a rich edit box.

(3)From MSDN (TextBoxBase::MaxLength): If the MaxLength property is set to 0, the maximum number of characters the user can enter is 2147483646 or an amount based on available memory, whichever is smaller.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 5-Jun-11 17:22pm    
Good point, but doubt about #2. You should check it up if you mention that. My 4.
--SA
The Magical Magikarp 11-Feb-20 0:29am    
Actually, the current amount is 2147483647
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Jun-11 17:21pm    
My 4. See the answer by Morph King.
--SA
Monjurul Habib 5-Jun-11 18:26pm    
ok, thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900