title: Creating a repeater dynamically inside an accordion pane
body: <p>My goal is to nest a <code>Repeater</code> inside an ASP.Net AJAX <code>Accordion</code>'s <code>AccordionPane</code>.</p>
  
  <p>So there is one Accordion which I am programmatically adding AccordionPanes to. The amount of panes I add depends on my particular dataset's count value, usually no more than 5. I've managed to do this successfully.</p>
  
  <p>The thing I am having difficulty with is creating and adding a Repeater per each AccordionPane.</p>
  
  <p>I've glanced over <a href="http://iridescence.no/post/Using-Templated-Controls-Programmatically.aspx" rel="nofollow">http://iridescence.no/post/Using-Templated-Controls-Programmatically.aspx</a> but this is not exactly what I had in mind. Instead, I would rather declare a single Repeater as static HTML that I could then "clone" when I need. How can I achieve this? Obviously I would want each control's ID (within this declared Repeater) to be generated automatically each time i "clone" it.</p>
  
  <p>The repeater looks like this:</p>
  
  <pre><code>&lt;asp:Repeater ID="rptForum" runat="server"&gt;
      &lt;ItemTemplate&gt;
          &lt;div runat="server" style="border:solid #d3d3d3 1px; border-bottom-width:0px;"&gt;
              &lt;table width="100%"&gt;
                  &lt;tr&gt;&lt;td align="left"&gt;
                      &lt;asp:Label runat="server" Font-Size="12px" /&gt;
                  &lt;/td&gt;&lt;/tr&gt;
                  &lt;tr&gt;&lt;td align="left"&gt;
                      &gt;&gt;&amp;nbsp;&lt;asp:Label runat="server" Font-Size="12px" Text='&lt;%# Eval("query") %&gt;' /&gt;
                  &lt;/td&gt;&lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>I might add more fields to be databound as I progress.</p>
  
  <p>Any ideas appreciated..</p>