I'm having a issue with a textbox
when it's typed a huge string.
In my case, the textbox is used to write email addresses, and it doesn't have a limit of chars. So, I've made this test: I wrote 200 email addresses in a notepad, and I pasted the text on the textbox
and the text disappeared, but if I change the focus of the control, the text is displayed again. I already saw this link, but it doesn't helped me. I already tried to change the MaxLength
property to 0 (how the microsoft says to do), but it doesn't worked here too.
Considering a email address with 50 chars, the MaxLength property wouldn't be a problem, because 200 email addresses multiplying with 50 chars (each email), I'll have 10000 chars, and the default value of TextBox.MaxLength
is 32767.
And, before you ask for the code, I only set the text to a string.
myEmailObject.Address = txtEmail.Text;
Should I use RichText
, or what?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…