1
Reply

Cannot convert type 'System.Windows.Forms.HtmlDocument' to 'mshtml.HTMLDocument'

Massimo

Massimo

Jul 10 2009 12:21 PM
11.7k
Hi forum!

i have a problem with this code :

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
                            
                    HTMLDocument doc = new HTMLDocumentClass();
              
                    doc = (HTMLDocument) webBrowser1.Document;
              
         }

in second line doc = (HTMLDocument) webBrowser1.Document the VS tell me : "Cannot convert type 'System.Windows.Forms.HtmlDocument' to 'mshtml.HTMLDocument'"

Can you help me?

Thanks
Massimo

Answers (1)