Click here to Skip to main content
15,917,793 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear All;
I have build a c# winform application, Each use will enter comments using a richtext with ( Bold, Italic,Underline , alignment, FontColor ) features , then he will save his comment in the database , so that I want to display the comments with the used formats.
while saving and inserting data I have used this line of code :
com.Parameters.Add("@cmts", SqlDbType.NText).Value = rtbDoc.Rtf;


And I have used a webbroswer control to display data ( I have choosed webbrowser control because it is easy to display and desgin the data using html tables )

And I choosed to display the comments is textarea field. But it is displaying the comments like that :

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\qc\b\f0\fs17 Tamer Hatoum\par
\pard I am sending for testing \ul My software\ulnone\b0\par
}


So how can display it in the same formated text ??
Regards.
Posted
Updated 18-Dec-10 21:01pm
v2
Comments
TweakBird 19-Dec-10 3:01am    
Spell Checked.

1 solution

You will need to display this text in a rich text box to view this text as formatted text.
 
Share this answer
 
Comments
Tamer Hatoum 19-Dec-10 3:04am    
Thank you for your reply , but I mentioned that I want to display as textarea in html tags .. regards..
Abhinav S 19-Dec-10 3:57am    
Ok. See if http://forums.asp.net/p/1580597/3981366.aspx provides something that can help you.
Tamer Hatoum 19-Dec-10 7:06am    
this is from html to rtf .. I want to disply my RTf in Html ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900