[HowTo] Raising Custom Events in C#
First you need to declare an event in the class that’s going to raise the event. This is just like declaring a normal variable: public event EventHandler MyEvent; Then you need a method that’s going to be called to raise the event. This goes into the same class that you just declared the event in. […]
Exposing an event handler as a control property
You need to expose it as full-blown event, not as property. Page parser in ASP.NET is then able to wire syntax On=”handler_method_name” into your event as listener. #region Event Handlers public delegate void OnAddressSavedHandler(object sender, AddressEventArgs e); public class AddressEventArgs : EventArgs { public Int64 AddressID; public AddressEventArgs(){ } public AddressEventArgs(Int64 val) { AddressID = […]