A
Ana Lindt
Hello,
I have a little webbrowser control in my c# winforms app, and would like
to catch those nifty DOM events and do some fancy stuff with them.
Let's say i have some button in the web page:
<button id='buttonID'>click here</button>
then with the following two lines of C# i can catch the click event:
-- code ---------------------------------
HTMLButtonElement button = (HTMButtonElement)
someWebBrowser.dom.all.item("buttonID", null);
((HTMLButtonElementEvents2_Event) button).onclick += new
HTMLButtonElementEvents2_onclickEventHandler(someWebBrowser.button_click
);
private void button_click(...) {...}
-- eoc ----------------------------------
Now id like to do exactly the same thing with a checkbox:
<input type='checkbox'>this is a check box
-> The problem is: Even though the HTMLInputElement is in the mshtml
namespace, I can't find a "HTMLInputElementEvents2_Event" handler!
How can I use the HTMLInputElement.onclick event??
Thanks in advance for any help,
Ana L.
I have a little webbrowser control in my c# winforms app, and would like
to catch those nifty DOM events and do some fancy stuff with them.
Let's say i have some button in the web page:
<button id='buttonID'>click here</button>
then with the following two lines of C# i can catch the click event:
-- code ---------------------------------
HTMLButtonElement button = (HTMButtonElement)
someWebBrowser.dom.all.item("buttonID", null);
((HTMLButtonElementEvents2_Event) button).onclick += new
HTMLButtonElementEvents2_onclickEventHandler(someWebBrowser.button_click
);
private void button_click(...) {...}
-- eoc ----------------------------------
Now id like to do exactly the same thing with a checkbox:
<input type='checkbox'>this is a check box
-> The problem is: Even though the HTMLInputElement is in the mshtml
namespace, I can't find a "HTMLInputElementEvents2_Event" handler!
How can I use the HTMLInputElement.onclick event??
Thanks in advance for any help,
Ana L.