title: HTML table tag with col, colgroup, tbody, and thead throws compile error in Visual Studio 2010 and Visual Studio 2012
body: <p>I have a .NET 3.5 web site with a table tag that contains col, colgroup, tbody and thead tags.  This is a server side tag with the runat="server" attribute.  This table was working fine in Visual Studio 2010, but after I installed Visual Studio 2012 and .NET 4.5, this tag now fails to compile in Visual Studio 2010 and in Visual Studio 2012.  (I tried both.)  Here are the compiler errors that are being thrown:</p>
  
  <blockquote>
    <ul>
    <li>The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)'
    has some invalid arguments </li>
    <li>Argument '1': cannot convert from 'System.Web.UI.HtmlControls.HtmlGenericControl' to
    'System.Web.UI.HtmlControls.HtmlTableRow'</li>
    </ul>
  </blockquote>
  
  <p>Here's an example of what I'm working with:</p>
  
  <pre><code>&lt;table id="TestTable" runat="server"&gt;
      &lt;colgroup&gt;
          &lt;col width="30%" /&gt;
          &lt;col width="70%" /&gt;
      &lt;/colgroup&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;td&gt;Sample header 1&lt;/td&gt;
              &lt;td&gt;Sample header 2&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Sample cell 1&lt;/td&gt;
              &lt;td&gt;Sample cell 2&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Sample cell 3&lt;/td&gt;
              &lt;td&gt;Sample cell 4&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Does anyone know how to fix this problem, so that we can get the site to compile and continue working?</p>