Archive for August, 2013

After installing Windows 8 today, I started receiving error “The best overloaded method match for ‘System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)’ has some invalid arguments” in my existing project. The project was working fine in VS 2010 till yesterday and it was still compiling and running fine in my colleagues PC.

After spending time on internet and surfing various sites I came to know that it is .NET Framework 4.5 which causes the issue. Once you install .NET Framework 4.5 in your PC and your website is pointing to .NET Framework 4.0 you will still receive the same error.

I was using html <table> with <tbody> tag and runat=”server” as shown in code below.


<table id="Table1" runat="server" >
                <td align="left">
                <td />
            <tr />

.csharpcode, .csharpcode pre
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
background-color: #f4f4f4;
width: 100%;
margin: 0em;
.csharpcode .lnum { color: #606060; }

The solution was simple. Just remove <tbody></tbody> tag and code will compile.

For more detail please check http://stackoverflow.com/questions/12500332/html-table-tag-with-col-colgroup-tbody-and-thead-throws-compile-error-in-visu

Happy Programming !!!

Read Full Post »