How to display only 3 table cells per row when looping through a collection
<p>I am looping through a collection, and generating a htmltable.</p>

<p>I want to only display a maximum of 3 table cells per row.</p>

<p>I need some help with that logic.</p>

<p>My code so far is displaying 1 item per row.</p>

<pre><code>HtmlTable table = new HtmlTable();
HtmlTableRow row;
HtmlTableCell cell;

for(int x = 0; x &lt; userList.Count; x++)
{
   row = HtmlTableRow();

   cell = HtmlTableCell();

   // other stuff

   row.Controls.Add(cell);
   table.Controls.Add(table);
}
</code></pre>
