[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

CompositeControl: At Design Time, Child Elements not in Controls Property

Meron Lavie

6/23/2010 2:22:00 PM

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?