I am using WPF's WebBrowser control to load a simple web page. On this page I have an anchor or a button. I want to capture the click event of that button in my application's code behind (i.e. in C#).
Is there are a way for the WebBrowser control to capture click events on the loaded page's elements?
In addition, is it possible to communicate event triggered data between the page and the WebBrowser? All of the above should be possible am I right?
- Edit: Probable solution:
I have found the following link that might be a solution. I haven't tested it yet but it's worth the shot. Will update this question depending on my test results.
http://support.microsoft.com/kb/312777
- Link taken from: Source
Best Answer
Ok Answer found - tested and it works:
The following is an example code:
You will need two components: WebBrowser (webBrowser1) and a TextBox (textBox1)