Link to home
Start Free TrialLog in
Avatar of kennysflau
kennysflau

asked on

Display RTF

Hi Experts,

I'm using VS 2008. ASP.Net c#.

I'm writing a web application and have extracted some text in rtf format from database, is there any control which can display my rtf text?

Thanks!!!!!
Avatar of Pacman
Pacman
Flag of Germany image

What about RichTextBox ?
Avatar of kennysflau
kennysflau

ASKER

Is there any sample? Could you pls elaborate?
I don't know ASP classes. But in dotnet it's straightforward.

Use RichTextBox control and call method LoadFile() to load the rtf file.
if yo are working with ASP, you can convert it to html for presenting purposes:
http://www.codeproject.com/KB/recipes/RtfConverter.aspx
I cannot find RichTextBox in my Toolbox?
RTB is not available for webforms, that's why I suggested to convert the contents to html
jaime, i don't very understand the document. Sorry but I'm very green in .Net, would you please further elaborate? Do I need to add any reference or class... something like this? Thanks so much
there is not a standard rich textbox control for asp, as I mentioned earlier, so, a good alternative is to convert the RTF file contents into html, so you can show it in a web page with easy.
The link I have provided points to a open source code to do this.
There is a microsoft web cast: how to use a RichTextBox in asp.net.
But it's in german language only.
A useful link from the web cast is:

www.fckeditor.net/download

From there you can get "FCKeditor.net". A module which allows you to insert RichtTextBoxes in Visual Studio.

Maybe this will help you.
Is iit be possible to open my content with WordPad? Create a temp file in memory..... something like this...
if you don't want to watch it on a separated windows and not the browser, just put a link to the document in the webpage. RTF files are automatically recognized by the OS.
Unluckily, The source is not a rtf file.

I'm extracting the data from database which is in rtf format, so I will have to create a "virtual" rtf file in the memory and write the data into it, then open it with word or wordpad.

For example, my extracted data is like:
{\rtf1\ansi\ansicpg950\deff0\deflang1033\deflangfe3076{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 abc \b ABC\b0\par
}
 
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial