Ming_Lei Posted October 31, 2004 Posted October 31, 2004 I have another problem. IF I want to save RichText TextBox content into database and later retrieve it so that the fonts and colors of texts in it are preserved. How can I do it? I have tried to save .Text property which only perserves the text body but not the fonts and colors. Which property of the RichText should I be using?? - Thanks. Quote
Administrators PlausiblyDamp Posted October 31, 2004 Administrators Posted October 31, 2004 Use the RTF property rather than the Text property. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ming_Lei Posted October 31, 2004 Author Posted October 31, 2004 Can't save I am trying to save .Rtf property to database which uses a text type field to store RichText content, but it failed to save. Code as follows: ==================================== string cmdstr = "insert into diary2 values('"+date+"', '"+DiaryTextBox.Rtf+"')"; OleDbCommand cmd = new OleDbCommand(cmdstr, conn1); cmd.ExecuteNonQuery(); What is the problem? - Thanks. Quote
Ming_Lei Posted November 1, 2004 Author Posted November 1, 2004 Thanks for the reply. I have checked on the web for solutions, and I have found it!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.