views:

207

answers:

1

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.

+2  A: 

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.

JoshBerke
Could you offer some more details, please? Maybe a link to some more information. I would really appreciate it.
iulianchira
I don't have anything handy, I'm making an assumption here that you have a page or a parent container of some sort...let me ponder some more.
JoshBerke