How to get children with composite control at design time

I am developing an ASP.NET v3.5 user control based on CompositeControl.

However, I do NOT want to create my child controls using code, but rather the built-in HTML tag elements in CompositeControl on an ASPX page, for example:

<cc:MyCompositeControl ID="MyControl">
    <asp:Label>Cat</asp:Label>
    <asp:Label>Cat</asp:Label>
</cc:MyCompositeControl>

At run time, MyControl.Controls contains two labels, as expected.

At development time, MyControl.Controls is empty.

I need this information during development for various reasons.

What am I doing wrong?

+3
source share
1 answer

, System.Web.UI.WebControls.Panel DLL System.Web, Reflector. , .

0

Source: https://habr.com/ru/post/1751410/


All Articles