RTF or DOC from db to html page - how?

J

Jeff User

Hiall

I am reading from an Oracle database CLOB column. I dont know what
the data type of the data is before hand, but it could be either plain
text (no problem) or rtf or Word doc that was pasted into a text box
and saved.

If data retrieved is rtf or doc it is raw and all raw data formatting
is also displayed.
Is there a way to display this on my aspx web page in a clean manner
without all the raw data formatting code ?

Thanks
jeff
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Jeff User said:
Hiall

I am reading from an Oracle database CLOB column. I dont know what
the data type of the data is before hand, but it could be either plain
text (no problem) or rtf or Word doc that was pasted into a text box
and saved.

If it was pasted in a textbox all the formatting is lost and you are left
with plain text.
If data retrieved is rtf or doc it is raw and all raw data formatting
is also displayed.
Is there a way to display this on my aspx web page in a clean manner
without all the raw data formatting code ?

Not only that but you cannot display other than text in a aspx, you would
have to send the word document to the user, but it will not be displayed in
something like a textbox.
 
J

Jeff User

Ignacio

Then apparently I dont know how they entered the data (Supposedly they
pasted the data, but I have been mis informed before). :blush:)
I think I have the formatting info in the text.
For example, the text I get from one of the clob columns starts off
like this:
"{\\rtf1\\ansi\\ansicpg1252\\uc0\\deff0{\\fonttbl\r\n{\\f0\\fswiss\\fcharset0\\fprq2
Arial;}\r\n{\\f1\\froman\\fcharset2\\fprq2
Symbol;}}\r\n{\\colortbl;\\red0\\green0\\blue0;\\red255\\green255\\blue255;}\r\n{\\info{\\comment
TX_RTF32 8.0.300.500}}\r\n\\deftab720\\pard\\plain\\f0\\fs20
Doug:\\par\\par The email below was sent to .........."

Then there are two images apparently, embedded in there. blah blah.

Is there a way for me to determine this data "type" in C#?
Some C# function?
If so, I think I can output it directly to a new IE window .

Thanks again
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top