GeckoFX DocumentText Similar To Webbrowser Control (C#)
In a traditional webbrowser control, you can get the page source like this:
However, in GeckoFX webbrowser, there's no DocumentText property. A workaround is to get the InnerHtml property of html tag using the code below:
Cheers!
string pageSource = webbrowser1.DocumentText;
string pageSource = string.empty; if (!string.IsNullOrEmpty(this.Document.GetElementsByTagName("html")[0].InnerHtml)) pageSource = this.Document.GetElementsByTagName("html")[0].InnerHtml;
Comments
Post a Comment