Click here to Skip to main content
11,637,662 members (71,582 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# HTML Events DOM , +
I would like to MONITOR an HTML control (HtmlElement) inside a WebBrowserControl.
I would like to add EVENTS to the control in order to be notified whenever any EVENT got call(fire) on that control.
To simplify my needs here are 3 questions assuming the following single line of code:
var FirstDIV = webIE.Document.Body.GetElementsByTagName( "div" ).FirstChild();
1. How can I know WHAT events are listening (or attached) to FirstDIV?

2. How can I ADD an event(AttachEventHandler) to the TOP of the EVENT LIST in order to be called/notified BEFORE the current FirstDIV event handler? I will use that as a DEBUG just to know that the CONTROL receives/fires an envent.

3. Can I use reflection(C#) to ADD MY.LISTENING.EVENTS to the control current events so I can check whenever any EVENT is call(fire)?

++Thanks
Posted 12-Jan-12 3:51am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 344
1 OriginalGriff 295
2 stibee 288
3 jyo.net 270
4 himanshu agarwal 189
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,763
2 Mika Wendelius 6,999
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320


Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 12 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100