capturing DOM events in webbrowser control

H

Hari

Hi,

I am creating a win app that hosts a web browser control in C#. The
web browser renders some local html page. I need to capture the events
on that page. I know this can be done with DOM. But how to I handle
DOM events? PLZ help.

Thanks,
Hari
 
N

Nicholas Paldino [.NET/C# MVP]

Hari,

If you are using the WebBrowser control, then you should be able to get
the HtmlDocument instance, and then find the elements in the document that
you want to attach events to. The events are exposed as regular events in
..NET (even though the underlying implementation, MSHTML, handles them a
little differently), so you shouldn't have any problem connecting to them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top