Hello... I have a composite control inside a repeater and I am trying to databind its properties like so (simplified example) :
<uc1:Control ID="id" runat="server" Value='<%# Eval("value") %>'>
This works fine when I include the repeater inside a web user control, include that web user control inside ANOTHER web user control and then place the top level web user control onto a page - when I inspect the Value property inside of the composite control's EnsureChildControls() method that property's value is correctly set from the database.
However, when I place my repeater with the composite control in it inside a web user control and then include that on the page without another level of web user control it breaks - all of the composite control's properties that I am trying to set from the DB are NULL when I inspect them inside the EnsureChildControls() method of the composite control.
If I hard-code a value for the Value property like so:
<uc1:Control ID="id" runat="server" Value="1" %>
then it is correctly set as well.
This is confusing the hell out of me and giving me a headache - it must have something to do with the timing of events and it being altered by the different structures and layers of user controls but how can I fix it? Any ideas?
Thanks in advance...