If you mean that theControl is UserControl or ViewUserControl, they don't have property DataSource. If you mean DataList.DataSource, I did that.
Can you please explain above example with theControl, still I don't get it.
Expanded receive:
With "receive" I mean when binding is evaluated(to say like that) and every element in datalist get his data, in this case MyCustomObject object. Or binding under the hood works different?
Problem with user control here is because dynamically loading. If control is static(hard coded to the page), there will be no problem. But in runtime I decide with which data I fill my list of Objects(they all inherited from same class) and then decide which user control I am loading in the list. Second problem is that in those objecst I have arrays, so because of that I need to user control knows about object.Because of that I cannot put my array data(from object) in ViewData for example, because every object in the list have his own properties-arrays.
I'm trying best I can to describe you the problem, I hope so I am doing right.
Marko