Custom container control
<p>I'm trying to create a CollapsiblePanel control, which is essentially just a panel which has a header which can be used to expand / collapse the body. I've got an example of it working on a page (inline) but now what to make it a reusable control that can be used as follows</p>

<pre><code>&lt;cc:CollapsiblePanel runat="server" Header="This is a collapsible panel"&gt;  
    &lt;asp:Label runat="server" Text="This is the contents of the panel" /&gt;  
&lt;/cc:CollapsiblePanel&gt;
</code></pre>

<p>So, I want the CollapsiblePanel to render the header, the beginning of the container, then the contents of the container (i.e. the label in this case), and finally the end of container. </p>

<p>I'm unsure how to do this properly. I've seen some examples which override the rendering methods in order to insert controls at the right points, but it seems very hack-y. </p>

<p>What is the 'proper' way to do something like this? (.NET 4.0 if that makes a difference)</p>
