471,350 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

WebBrowser.DocumentText problem

Hello there,

I use webbrowser loading a web page and want to display the html file
in a RichtextBox. I find out that the size of the DocumentText is far
less than the actual size of the html file. So there are only part of
the html file is showed in the RichtextBox. Anyone has idea about this
problem? Thanks.

Lewis

Jan 24 '06 #1
2 4931
Lewis,

How do you expect to transform the content of the HTML file to rich text
format? The formats are inherently different, and can not be swapped out.

Also, the reason that the size of the content returned from the
DocumentText property is less than the actual size of the file is because
the DocumentText property returns the text, not the HTML markup, so the text
will always be of smaller size.

Why not just keep the contents in the web browser control? Do you have
need to edit it? If you do, then you will need to look into MSHTML hosting
services to enable editing in the web browser control.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"myzm" <my****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hello there,

I use webbrowser loading a web page and want to display the html file
in a RichtextBox. I find out that the size of the DocumentText is far
less than the actual size of the html file. So there are only part of
the html file is showed in the RichtextBox. Anyone has idea about this
problem? Thanks.

Lewis

Jan 24 '06 #2
The documenttext property indeed return the whole html markup content.
I just don't know why it got truncated somehow. I need to look at the
content so I can continue working on my program. All I need is to read
the content. I don't have authority to change it and I don't intend to
do so neither.

Jan 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Toma Marinov | last post: by
4 posts views Thread by Steve Richter | last post: by
reply views Thread by Sin Jeong-hun | last post: by
2 posts views Thread by Scott Gravenhorst | last post: by
7 posts views Thread by - Electronic.HR - | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.