|
-
Jun 16th, 2003, 11:07 AM
#1
Thread Starter
Hyperactive Member
Strange String Problem!
I'm in the process of updating some old code (which currently works fine), but I've run into a problem. The code uses a StringBuilder to append a series of string to build a SQL statement. One of the values comes from a textbox. I'm now required to use a RichTextBox, and I need to preserve the formatting. I've been trying to use the StringBuilder to append the RichTextBox's .rtf property to the string.
The StringBuilder works fine, and will append the .rtf, but after I append the .rtf I cannot append any more text.
i.e.
obj.Append("string1");
obj.Append("string2");
obj.Append(richtext.rtf);
obj.Append("string3");
obj.Append("string4");
In this example strings 3 and 4 will not append because they are after the .rtf string.
Does anyone have ANY idea why this is happening? Does it have anything to do with the fact that the .rtf property has a carriage return in it? If so, how can I remove the carraige return?
Thanks in advance for your help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|