Raise an event from a User Control.
I created a user control, let's just say this user control "Simpsons".
"Simpsons" control has some other controls on it, let's call them
"Homer", "Marge" and "Bart".
"Simpsons" should raise a "Click" event, whether the user clicks "Simpsons" itself or "Homer" or "Marge". How can I achieve this?
Thank you for your help!
P.S : The names of my controls are NOT actually "Simpsons","Homer","Marge" or "Bart." :-)
Jeong-hun wrote: |
| I created a user control, let's just say this user control "Simpsons".<br />"Simpsons" control has some other controls on it, let's call them<br />"Homer", "Marge" and "Bart".<br />"Simpsons" should raise a "Click" event, whether the user clicks "Simpsons" itself or "Homer" or "Marge". How can I achieve this?<br /><br />Thank you for your help!<br /><br />P.S : The names of my controls are NOT actually "Simpsons","Homer","Marge" or "Bart." :-) |
|
I'm relatively new around so there's most likely another and better way to do this but what I would do is this:
Create the SimpsonsOnClick method and just call it whenever the user click on homer, marge or bart (as well as on simpsons ofcourse).