How to use createDocumentFromUrl()?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

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
 
Back
Top