CompositeControl: At Design Time, Child Elements not in Controls Property -
06-23-2010
, 09:21 AM
I am designing a custom control based on CompositeControl.
However, i do NOT want to design my child controls in code, but rather as
embedded elements, such as:
<cc:MyCompositeControl ID="MyControl">
<asp:Label>Cat</asp:Label>
<asp:Label>Cat</asp:Label>
</cc:MyCompositeControl>
At run time, MyControl.Controls contains the two labels as expected.
At design time, MyControl.Controls is empty.
I need this information at design time for varius reasons.
What am I doing wrong? |