如何提取webBrowser控件定向后页面中的内容?
string url = "www.google.com";
webBrowser1.Navigate(url);//将控件页面定向到url字符串制定的内容
string content = webBrowser1.Document.ToString();//但这样提取不到内容,增加这句会报错,webBrowser1.Document对象不存在。
报错:Object reference not set to an instance of an object.
把后一句去掉是可以正常显示的。