Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(C#) Raise an Event
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01016081
Message ID:
01016700
Views:
9
Mike,

All you need to do is call the handler directly like this:
this.OnClick(this.ReportsPad, EventArgs.Empty);
Does that not work for you?

Chad

>I'm trying to get some code to execute. This code is part of the Mere Mortals Framework. The code to be executed is in an event handler, which is bound the the MenuItem.Popup event. In the MM code, it's done like this:
>
>this.CurrentMenuItem.Popup += new EventHandler(this.OnClick);
>
>So, I need to get my MenuItem's .Popup event to fire so the code in "this.OnClick" will run. Clicking, or simulating a click will not work, because the MenuItem has no sub-items, so .Popup never fires.
>
>If C# had a "raise" keyword, then I could just do
>
>raise myMenuItem.Popup
>
>Thanks,
>Mike
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform