Hi,
I have a scenario where I dynamically load 2 user controls in a webform, and need them to interact together. Here's the code :
default.aspx.cs
ControlA cA = (ControlA)LoadControl("~/controlA.ascx");
ControlB cB = (ControlB)LoadControl("~/controlB.ascx");
Page.Controls.Add(cA);
Page.Controls.Add(cB);
Now the thing is, controlB needs to pass a data to controlA. Data is not from an event (well part of). When user click on a link from controlB, we get data from a DB, and what I need to pass to controlA is the ID of the first data fetch from request. And of course, when user click on the link in controlB, page do a postback.
I looked at events & delegates, but I can't make it to work. Is it the right way to go ?
If anyone could have a clue, it would be really appreciated !