ASP.NET textbox issue
I have a textbox. I set its maximum limit to say 15000 characters. No problem here. When I enter more than 4000 characters in it, they do not get rendered meaning they just appear as blank sp开发者_如何学运维aces. It still goes upto the limit though.
Any ideas?
Thanks.
What do you mean they dont get rendered? When you type the 4001th char, it moves over a space, but you dont see the char?
Or do you mean after a postback, the characters after 4000 are lost?
One thing about 4000, it happens to be the max storage size for nvarchar in sql server. It could be you are sending the value to the server in a ontextchanged, updating the db, then re-updating the control with the db value which is now truncated? Just a thought.
It would be helpful to clarify if you dont see the chars without any server postbacks, or if the chars are lost after a postback (keep in mind if you have an UpdatePanel with a changed event and autopostback=true, a postback could be occurring transparently when you tab out of the field).
精彩评论