Hi,
I'm developing my first CompositeControl that contains a handful of standard ASP.NET server controls, one of which is an asp:Panel. I'm trying to find out how I can nest content within the begin and end tags of my custom control in an aspx page so that it appears in the panel of my composite control. For example, I'd like the inner content shown below to appear inside the panel of my custom control:
<cc1:Comp1 ID="comp1" runat="server" Header="I am the header!" Width="400px" Height="300px" Footer="I am the footer!">
Name: <asp:TextBox id="Name" runat="server"/>
<asp:CheckBox runat="server" id="rememberMe" Checked="true" Text="Remember me!" />
</cc1:Comp1>
I have overridden CreateChildControls as recomended to create my controls but all nested content seems to get appended onto the end of the control tree, so renders after the custom control. I've tried many things to solve this - the closest I got was to re-arrange the control tree inside OnPreRender but then couldn't get the events to work fully.
I'm sure there is a straight forward solution to this!
Any help much appreciated.