Uninstall Visual Studio 2012 and .NET 4.5. Reference: Server side HTML table with tbody not compiling in ASP.NET 4.5
I realize that this is not necessarily an ideal solution, but if none of the other solutions below can be implemented easily, you may end up with no other choice. Also, just because this is the first entry, it is not what I am recommending as the primary solution. It's just an option.
Convert your web site into a web application. The table with runat="server" appears to compile file when using a web application.
There are additional benefits to doing this conversion, such as making it easier to write unit tests against the code inside your web application. However, you will need to evaluate the work involved with converting from a web site to a web application, and you will need to convince your bosses and fellow coworkers that you need to make this change.
Check the server side code (code behind page/control) for the table. Are you using the control in the server side code? If not, remove runat="server". The page then compiles just fine.
Sample header 1Sample header 2
Sample cell 1Sample cell 2Sample cell 3Sample cell 4You are using the control in the server side code. Remove the col and colgroup tags and move the column stylings into the td or th cells of the first row of the table. (Column width and stylings inherit from the first row down the table, so setting width="40%" on the first cell, for example, makes all cells in that column have width="40%".) Remove the thead tag and change all td cells in the table to th (table header) cells. Remove the tbody tag.
Sample header 1 | Sample header 2 |
---|---|
Sample cell 1 | Sample cell 2 |
Sample cell 3 | Sample cell 4 |
Convert to using the