I'm basically trying to get webcontrols to talk to one another.
I have one WUC that wants to get information from another.
In ControlB's GetDataFromControlA method
public List<ControlBData> GetDataFromControlA()
{
ControlA c = Page.FindControl( IdOfControlA) as ControlA;
if( c != null)
{
return c.Data;
}
...
}
At code time ControlB knows nothing of ControlA...so ControlB cant access its members, and the above wont compile.
I'm thinking I have to use methods in the page to get the controls talking to one another...
I was missing the <%@ Reference Control="~/ControlA.ascx" %> in ControlB.ascx
This 'fixes' the intellisence and the compile error! Found here