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!!!!!
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!!!!!
What about RichTextBox ?
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.
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
http://www.codeproject.com/KB/recipes/RtfConverter.aspx
ASKER
I cannot find RichTextBox in my Toolbox?
RTB is not available for webforms, that's why I suggested to convert the contents to html
ASKER
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.
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.
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.
ASKER
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.
ASKER
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\def f0\deflang 1033\defla ngfe3076{\ fonttbl{\f 0\fswiss\f charset0 Arial;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\u c1\pard\f0 \fs20 abc \b ABC\b0\par
}
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\def
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\u
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.