So I am trying to have a window with Web Browser control in which I will be filling forms on various websites. This is my current code to load google, which works fine:
Then, here's my document completed code:Code:private void Form1_Load(object sender, EventArgs e){ WebBrowser1.Navigate("www.google.com"); }
Code:private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e){ HtmlDocument doc = this.WebBrowser1.Document; }
This is the error I am getting:
Can someone please explain to me what I am doing wrong?Code:Error 1 Cannot implicitly convert type 'object' to 'System.Windows.Forms.HtmlDocument'. An explicit conversion exists (are you missing a cast?) C:\Users\Admin\AppData\Local\Temporary Projects\WindowsFormsApplication1\Form1.cs 27 32 WindowsFormsApplication1




Reply With Quote