Dynamic panel/controls - ASP.Net VS2008
<p>I have the following table</p>

<pre><code>&lt;td class="style2"&gt;
    &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
        &lt;asp:ListItem&gt;Location&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;Name&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;SSN&lt;/asp:ListItem&gt;
    &lt;/asp:DropDownList&gt;
    &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt;
        &lt;asp:ListItem&gt;LIKE&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;=&lt;/asp:ListItem&gt;
    &lt;/asp:DropDownList&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&lt;/td&gt;
&lt;td valign="bottom"&gt;
   &lt;asp:Button ID="btnAdd" runat="server" Text="Add" /&gt;
&lt;/td&gt;
</code></pre>

<p>When btnAdd is clicked I want to add another row of those filters. I assume I would create a panel and have these 3 controls and the add button would create a new panel or do I create all controls on the fly and then add them with code behind. </p>

<p>Edit::
When I click on btnAdd then I want to add another row as such</p>

<p>Before btnAdd Click</p>

<pre><code>&lt;td class="style2"&gt;
        &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
            &lt;asp:ListItem&gt;Location&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;Name&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;SSN&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt;
            &lt;asp:ListItem&gt;LIKE&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;=&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;br /&gt;
        &lt;br /&gt;

    &lt;/td&gt;
</code></pre>

<p>After btnAdd:</p>

<pre><code>&lt;td class="style2"&gt;
        &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
            &lt;asp:ListItem&gt;Location&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;Name&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;SSN&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt;
            &lt;asp:ListItem&gt;LIKE&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;=&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    &lt;/td&gt;

&lt;tr&gt;
&lt;td class="style2"&gt;
        &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
            &lt;asp:ListItem&gt;Location&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;Name&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;SSN&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt;
            &lt;asp:ListItem&gt;LIKE&lt;/asp:ListItem&gt;
            &lt;asp:ListItem&gt;=&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;br /&gt;
        &lt;br /&gt;
    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>
