Can I insert multiple <tbody> elements into an asp:Table programmatically?
<p>See also the related question <a href="http://stackoverflow.com/questions/3076708/can-we-have-multiple-tbody-in-same-table">can we have multiple &lt;tbody&gt; in same &lt;table&gt;?</a></p>

<p>Say I want to generate the following table using asp:table:</p>

<pre><code>&lt;table&gt;
    &lt;thead&gt;
        ...stuff...
    &lt;/thead&gt;
    &lt;tbody class="odd"&gt;
        &lt;th scope="tbody"&gt;CUSTOMER 1&lt;/th&gt;
        &lt;tr&gt;&lt;td&gt;#1&lt;/td&gt;&lt;td&gt;January&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#2&lt;/td&gt;&lt;td&gt;April&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#3&lt;/td&gt;&lt;td&gt;March&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;tbody class="even"&gt;
        &lt;th scope="tbody"&gt;CUSTOMER 2&lt;/th&gt;
        &lt;tr&gt;&lt;td&gt;#1&lt;/td&gt;&lt;td&gt;January&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#2&lt;/td&gt;&lt;td&gt;April&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#3&lt;/td&gt;&lt;td&gt;March&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;tbody class="odd"&gt;
        &lt;th scope="tbody"&gt;CUSTOMER 3&lt;/th&gt;
        &lt;tr&gt;&lt;td&gt;#1&lt;/td&gt;&lt;td&gt;January&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#2&lt;/td&gt;&lt;td&gt;April&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;#3&lt;/td&gt;&lt;td&gt;March&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>Can I build these <code>&lt;tbody&gt;</code> / <code>&lt;tr&gt;</code> elements programmatically?</p>

<p>I tried doing something like:</p>

<pre><code>var x = new HtmlGenericControl("tbody");
x.Attributes["class"] = jobNum % 2 == 0 ? "even" : "odd";
TableRow xinfoRow = buildXInfoRow(job); x.Controls.Add(xinfoRow);
TableRow xdescriptionRow = buildXDescriptionRow(job); x.Controls.Add(xdescriptionRow);
myTable.Controls.Add(x);
</code></pre>

<p>But this just gives me the error <code>'Table' cannot have children of type 'HtmlGenericControl'</code>.</p>

<p>I can find a TableRow, TableCell, TableHeaderRow, TableHeaderCell, etc. classes, but I can't seem to find TableBody or TableHeader. I can place rows within the header, body or footer:</p>

<pre><code>descriptionRow.TableSection = TableRowSection.TableBody;
</code></pre>

<p>...but I can't seem to divide the rows into multiple different <code>&lt;tbody&gt;</code> elements. I've pretty much given up and gone to using an <code>&lt;asp:ListView&gt;</code> to generate the table, but I'm interested to see if this can be done.</p>
