1

I have a windows form application with a browser component in it.

My goal is to load a webpage and pass variable's from the webpage to the form. Maybe trough java script. But i cant find out if it is even possible to pass variable's from the webrowser component to the the rest of the form.

noseratio
  • 59,932
  • 34
  • 208
  • 486
Robin
  • 392
  • 1
  • 2
  • 12
  • 1
    You can call the page's JavaScript from `WebBrowser` (or inject some new one) and get back any page's variables this way. More details: http://stackoverflow.com/a/19002650/1768303 – noseratio Oct 29 '13 at 20:36

1 Answers1

0

Load the web page with Webbrowser.Navigate() then get the html of the loaded page using the WebBrowser.DocumentText property. You have to read this property after the page is loaded so use it in the DocumentCompleted handler.

Jerry
  • 4,258
  • 3
  • 31
  • 58