To get the WPF WebBrowser content, I found this solution somewhere, and it seems to work, but only if the target platform is at least .Net 4.0, and you have included Microsoft.CSharp.dll (which wonβt be selected if your target structure is <4.0). I added it to LoadCompleted :
private void myBrowser_LoadCompleted(object sender, NavigationEventArgs e) { dynamic doc = myBrowser.Document; dynamic htmlText = doc.documentElement.InnerHtml; string htmlstring = htmlText; }
Add
myBrowser.LoadCompleted += new LoadCompletedEventHandler(myBrowser_LoadCompleted);
after InitializeComponent() to verify that the method is being called.
Dick
source share