473,412 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 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 5055
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Toma Marinov | last post by:
Hello ! I made some test with webbrowser control in VS.2005. When I load a word document in webbrowser through .Navigate method (from my hdd), I want to get the stream of the loaded doc file with...
5
by: Boki | last post by:
Hi All, I am using webbrowser control, it is very often to happen: A first chance exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll but sometimes...
1
by: iwdu15 | last post by:
ok, this is driving me insane, plz someone help. im attempting to add text to a webbrowser document text by doing as follows, IM is an Instant Message object in the AIM SDK, the line Dim str As...
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
0
by: Sin Jeong-hun | last post by:
I've found that if a MessageBox (called by alert/confirm from Javascript) or a web page modeless dialog is popped up, I cannot call Navigate of the WebBrowser control. If I do, a COM exception...
2
by: Zytan | last post by:
I have a WebBroswer control, and I set the HTML it will display via DocumentText, which takes a a string. This shows the HTML code from the string in the control. But, sometimes, the WebBrowser...
0
by: micmit | last post by:
I wanted to avoid any HTML file creation , so initial HTML was formed as a string and assigned to DocumentText. After that the aim was to manipulate with html using DOM . It turned out...
2
by: Scott Gravenhorst | last post by:
I recently (within 30 days) downloaded and installed VB 2005 Express. I like it a whole lot... but: I have been trying to work with the WebBrowser control to display a small amount of help text...
7
by: - Electronic.HR - | last post by:
I have very strange and stupid problem with .NEt's webBrowser control... If I do this: ---------------------------------- private void btnGoogle_click(object sender, EventArgs e) { ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.