Reputation: 11327
In a webpart I have two user controls loaded. I want to be able to populate one of the controls when an event is triggered in the other control, a parameter has to be passed between the controls.
Upvotes: 0
Views: 415
Reputation: 67108
You could have your webpart wire the two controls together so lets assume your controls are producer and consumer.
void on_Load()
{
producer.CustomEvent+=new EventHandler(consumer.HandleCustomEvent);
}
This is one of the simpler solutions however it can be brittle.
Upvotes: 2