Global Events that all instances of a control handles

P

Phil

I have a user control (called MyControl that inherits from
CompositeControl). This control will raise an event when the user changes
the color of the control. (MyControl.ColorChange). Inside the code for
MyControl, I also listen and handle the event (ColorChange). - This actually
implements the change in color. This works OK for the control that raised
the event.

However, in the aspx form, I have 5 instances of the same user control
(MyControl). When one of the controls change color (based on user input) I
would like to have each instance of the MyControl listen for the event and
handle the ChangeColor event. When I try this only the control that raised
the event will hear the event. Is there any way to globally raise an event
that all controls could listen too?

Thanks

Phil
 
P

Phil

Thanks for the response. I managed a workaround, but your suggestions is
much neater. Will try to implement it this way!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top