How to use createDocumentFromUrl()?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brett

    How to use createDocumentFromUrl()?

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

    object WebpageContent;
    mshtml.HTMLDocu ment MSHTMLobj = new mshtml.HTMLDocu ment();
    WebpageContent = MSHTMLobj.creat eDocumentFromUr l(http://www.microsoft.com,
    "");

    I get this error:
    The server threw an exception.

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

    Any suggestions?
    Thanks,
    Brett


  • Olivier Verdin

    #2
    Re: How to use createDocumentF romUrl()?

    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:O9utEw4ZFH A.3808@TK2MSFTN GP09.phx.gbl...[color=blue]
    > I'm having problems trying to get HTML content from a website.
    >
    > object WebpageContent;
    > mshtml.HTMLDocu ment MSHTMLobj = new mshtml.HTMLDocu ment();
    > WebpageContent = MSHTMLobj.creat eDocumentFromUr l(http://www.microsoft.com,
    > "");
    >
    > I get this error:
    > The server threw an exception.
    >
    > I have also tried declaring with HTMLDocumentCla ss() and IHTMLDocument2( )
    > with no luck.
    >
    > Any suggestions?
    > Thanks,
    > Brett
    >
    >[/color]


    Comment

    Working...