473,473 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

createdocumentfromurl problem

I am trying to use MSHTML without the webbrowser and I am having a few
problems. Right now all I am trying to do is load an URL(html page) and
access its innerhtml.
What I have is:
HTMLDocument hd = new HTMLDocument();
IHTMLDocument2 ihd;
((IHTMLDocument2)hd).write("<html></html>");
((IHTMLDocument2)hd).close();
ihd = ((IHTMLDocument4)hd).createDocumentFromUrl("http://www.aksam.com.tr",
"");

It seems like I am able to load the url correct (ran a packet sniffer),
however, I cannot figure out how to detect that it has completed. I looked
in
the web and there were some old examples using:

while(ihd.readyState != "complete")
{
Console.WriteLine(ihd.readyState);
Thread.Sleep(10);
}

But when I tried it never ended.
Any suggestions/ideas?


Nov 17 '05 #1
0 1671

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
0
by: gqtang | last post by:
How to use IHTMLDocument2.createDocumentFromUrl method
1
by: Brett | last post by:
I'm having problems trying to get HTML content from a website. object WebpageContent; mshtml.HTMLDocument MSHTMLobj = new mshtml.HTMLDocument(); WebpageContent =...
1
by: Pat Mac | last post by:
Does anyone have a working example of the HTMLDocument.createDocumentFromUrl function?? The few examples I found on the net don't seem to work. Here's a piece of code that seems to go through...
14
by: Vibhu Bansal | last post by:
Hello, I am having certain problems in trying to use the function createDocumentFromUrl in VB.NET but get this error.."Object reference not set to an instance of object". Here is the code that I...
2
by: Vibhu | last post by:
Hello All, I need to use mshtml.HTMLDocument.createDocumentFromUrl in VB.NET to load a webpage. The code looks like this Imports mshtml Public DocumentFactory As HTMLDocument would be very...
0
by: Jack Clift | last post by:
Dear Sirs, Sorry, have reposted from another section as have not received any response... I am using createDocumentFromUrl to obtain data from the web, which is called several times (>100) for...
0
by: k1ngdrew | last post by:
I am trying to use mshtml to parse a web page without using IE. I create the HTMLDocument object, and then assign to it the output value from createDocumentFromUrl(). I know that this is at least...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.