Click here to Skip to main content
11,711,009 members (86,848 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 549
1 OriginalGriff 255
2 Peter Leow 154
3 Maciej Los 120
4 Abhinav S 120
0 Maciej Los 95
1 Richard MacCutchan 90
2 Abhinav S 90
3 OriginalGriff 80
4 Member 4653839 50


Advertise | Privacy | Mobile
Web04 | 2.8.150819.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