Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 spaces. It still goes upto the limit though.

Any ideas?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
180 views
Welcome To Ask or Share your Answers For Others

1 Answer

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...