in MyControl:
{
}
in Parent:
hi everybody ,
I just wanted to add something to your code.. ,
you may check this event related a method or not like this ,
if (this.myEvent!=null)
MyEvent(((DropDownList)sender).SelectedIndex, ((DropDownList)sender).SelectedItem.Text);
just in case ;)
All event handlers should be voids with two parameters, the first being the sender of the event (typed as object) and the second being event arguments (typed as EventArgs or inherited class). Always use the typed event handler delegate EventHandler<T>, there's no reason to create a custom delegate for this ever.