Home All Groups Group Topic Archive Search About
Author
28 Jan 2006 6:08 PM
iwdu15
hi, how can i convert rtf encoding to HTML? i looked at previous posts and i
cant seem to find the HTTPUtility in vbexpress 2005. Is it not there, and is
there another way? thanks

--
-iwdu15

Author
30 Jan 2006 8:39 AM
Tim Anderson
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:BFCF9109-811B-4B30-B675-A4EAB8E14A73@microsoft.com...
> hi, how can i convert rtf encoding to HTML? i looked at previous posts and
> i
> cant seem to find the HTTPUtility in vbexpress 2005. Is it not there, and
> is
> there another way? thanks

Not sure what you want to do here. HttpUtility is still around, it's part of
System.Web and it works at the character level, encoding and decoding
strings, for example coverting between html entities and spaces or extended
characters.

I'm not sure how useful it would be to convert an RTF with HtmlEncode. It
would mean that you could display the RTF code in HTML with all its codes
and control words, but it would not get you nicely formatted text.

If you want to convert RTF-formatted text to HTML-formatted text, there is
no simple way. There are fundamental differences between the formats that
make conversion problematic, though you can do a reasonable job. Try
searching for rtf2html or for "RTF to HTML". There are some samples around
but nothing built into .NET.

Another idea is to paste RTF code into the Webbrowser control and to read
back the HTML.

Tim
Read my tech blog:
http://www.itwriting.com/blog
Author
30 Jan 2006 10:51 AM
Sofia Engvall
Why don't you just open the file with MS Word and save it as HTML? :)

/Sofia

Show quoteHide quote
"Tim Anderson" <timjand@nospam.nospam> wrote in message
news:O0ZP$iXJGHA.424@TK2MSFTNGP12.phx.gbl...
> "iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
> news:BFCF9109-811B-4B30-B675-A4EAB8E14A73@microsoft.com...
>> hi, how can i convert rtf encoding to HTML? i looked at previous posts
>> and i
>> cant seem to find the HTTPUtility in vbexpress 2005. Is it not there, and
>> is
>> there another way? thanks
>
> Not sure what you want to do here. HttpUtility is still around, it's part
> of System.Web and it works at the character level, encoding and decoding
> strings, for example coverting between html entities and spaces or
> extended characters.
>
> I'm not sure how useful it would be to convert an RTF with HtmlEncode. It
> would mean that you could display the RTF code in HTML with all its codes
> and control words, but it would not get you nicely formatted text.
>
> If you want to convert RTF-formatted text to HTML-formatted text, there is
> no simple way. There are fundamental differences between the formats that
> make conversion problematic, though you can do a reasonable job. Try
> searching for rtf2html or for "RTF to HTML". There are some samples around
> but nothing built into .NET.
>
> Another idea is to paste RTF code into the Webbrowser control and to read
> back the HTML.
>
> Tim
> Read my tech blog:
> http://www.itwriting.com/blog
>
>
Author
30 Jan 2006 9:04 PM
iwdu15
hi, thanks for the ideas...im trying to create a messenger program using
Sockets and network streams to send rich text, so i might try just adding the
Rich Text send to the receiving computers RichTextBox.rtf
property...hopefully thatl work
--
-iwdu15