0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

5 Comments

There is no postback involved. Simply entering characters in the textbox. I am not doing anything in the change events either. So after I type the 4001th character, it appears as a space basically and likewise for every character after that.
So it is more likely a problem with the browser? Which do you use? Have you tried others?
Can you put an example on a public server so we can inspect?
Haven't tried in another browser but a good idea. Let me check.
Interesting ... it renders properly on FF and Chrome. IE doesn't handle it properly though

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.