Custom control with Multiple Controls with same ID issue?
<p>I have a very simple custom control ive defined below:</p>

<pre><code>public class TestCtrl : WebControl
{
    protected override void OnInit(EventArgs e)
    {
        var btn = new Button() { ID = "test", Text = "text"};
        this.Controls.Add(btn);
    }
}
</code></pre>

<p>However, when I wish to place multiple instances of them on the same page, I get... </p>

<blockquote>
  <p>'Multiple controls with the same ID 'test' were found.</p>
</blockquote>

<p>...when <code>btn</code> is clicked.</p>

<pre><code>    protected void Page_Init(object sender, EventArgs e)
    {
        var ctrl1 = new TestCtrl() { ID = "ctrl1" };
        plc.Controls.Add(ctrl1);
        var ctrl2 = new TestCtrl() { ID = "ctrl2" };
        plc.Controls.Add(ctrl2);
    }
</code></pre>

<p>Is there a clean way to stop this from happening? Ive tried setting ClientIDMode to 'Auto' without any success, as the <code>name</code> property of the rendered markup is <code>"test"</code> on both buttons.</p>

<p>EDIT: Solved by adding 'INamingContainer' to the control 
<code>public class TestCtrl : WebControl, INamingContainer{...}</code></p>
