Dave,
Thanks for the pointers, but I can't figure out where to stick this code. I've read the article and tried putting the code in several places, but intellisense doesn't seem to recognize it and if I ignore intellisense and put the code in anyway, I keep getting the compiler error, "The event 'System.Web.UI.WebControls.Button.Click' can only appear on the left hand side of += or -=". Here's the code I'm trying to use:
Delegate[] delegates = this.Click.GetInvocationList();
Delegate[] delegates = this.MyButton.Click.GetInvocationList();
protected override void OnClick(EventArgs e)
{
Delegate[] delegates = Click.GetInvocationList();
base.OnClick (e);
}
Click *is* the Event, so why doesn't this work? I'm obviously missing some critical point. Any idea what that might be?
~~Bonnie
>>My question is this: is there something I can do to see what events have fired and which event handlers have been delegated to handle the event? I suspect something goes wrong in the wiring somewhere in there, and being able to track which events are actually firing might help me find where it's going wrong.
>>
>
>You ought to be able to call GetInvocationList to see a list of delegates for the event:
>
> Delegate[] delegates =
> MyEvent.GetInvocationList();
>
>
>I have never done this but you can read about it here:
http://www.fawcette.com/vsm/2003_05/magazine/columns/qa/