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

Home Posts Topics Members FAQ

How to use createDocumentFromUrl()?

I'm having problems trying to get HTML content from a website.

object WebpageContent;
mshtml.HTMLDocument MSHTMLobj = new mshtml.HTMLDocument();
WebpageContent = MSHTMLobj.createDocumentFromUrl(http://www.microsoft.com,
"");

I get this error:
The server threw an exception.

I have also tried declaring with HTMLDocumentClass() and IHTMLDocument2()
with no luck.

Any suggestions?
Thanks,
Brett
Nov 17 '05 #1
1 3713
Hi Brett,

Check out http://www.csharpfriends.com/Article...?articleID=210

I think this should help you.

Olivier
"Brett" <no@spam.com> wrote in message
news:O9**************@TK2MSFTNGP09.phx.gbl...
I'm having problems trying to get HTML content from a website.

object WebpageContent;
mshtml.HTMLDocument MSHTMLobj = new mshtml.HTMLDocument();
WebpageContent = MSHTMLobj.createDocumentFromUrl(http://www.microsoft.com,
"");

I get this error:
The server threw an exception.

I have also tried declaring with HTMLDocumentClass() and IHTMLDocument2()
with no luck.

Any suggestions?
Thanks,
Brett

Nov 17 '05 #2

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

Similar topics

0
by: gqtang | last post by:
How to use IHTMLDocument2.createDocumentFromUrl method
0
by: Tunga Torgal | last post by:
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: ...
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: Onur Buyukcaglar | last post by:
Hi, After reading and applying the following sample/example from Charles Law, who responded Vibhu Bansal's "createDocumentFromUrl usage in VB.NET / loading a url using mshtml.createDocumentFromUrl...
1
by: Onur Buyukcaglar | last post by:
Hi, After reading and applying the following sample/example from Charles Law, who responded Vibhu Bansal's "createDocumentFromUrl usage in VB.NET / loading a url using mshtml.createDocumentFromUrl...
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
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...
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
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,...
1
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...
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?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.