Usage of ITemplate in custom control
<p>I'm trying to figure out if I can use the <code>ITemplate</code> interface in a custom control. Here is what I've done so far.</p>

<pre><code>public class Tooltip : Control
{
    public ITemplate ContentTemplate { get; set; }

    protected override void CreateChildControls()
    {
        base.CreateChildControls();

        var ctrl = new HtmlGenericControl("a");

        if (ContentTemplate != null)
        {
            ContentTemplate.InstantiateIn(ctrl);
        }

        this.Controls.Add(ctrl);
    }
}
</code></pre>

<p>The asp.net control usage</p>

<pre class="lang-html prettyprint-override"><code>&lt;gc:Tooltip runat="server"&gt;
    &lt;ContentTemplate&gt;
        hello
    &lt;/ContentTemplate&gt;
&lt;/gc:Tooltip&gt;
</code></pre>

<p>The idea is that it should return something like this</p>

<pre class="lang-html prettyprint-override"><code>&lt;a&gt;hello&lt;/a&gt;
</code></pre>

<p>But the result looks like this</p>

<pre class="lang-html prettyprint-override"><code>&lt;ContentTemplate&gt;
  hello
&lt;/ContentTemplate&gt;
&lt;a&gt;&lt;/a&gt;
</code></pre>

<p>It does include the template tags and seem to ignore whatever I do.</p>

<p>Any advice is appreciated </p>
