Last post Aug 22, 2012 01:26 PM by Rajesh Sawant
Aug 22, 2012 01:10 PM|FahadMustafa|LINK
I have a ASP.NET Website that complied without errors on VS2010. After I installed VS2012 on the same machine I can't complie the project in VS 2010, I get the following error:
The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments
This error occurs because I have a table as following:
<table id="tbl1" runat="server">
Removing the "runat" tag or removing the tbody solved this error. But I cannot afford to change these in my project.
Any ideas how I can solve this ?
Thanks in advanced.
Aug 22, 2012 01:16 PM|Altamash23|LINK
Inside the table tag try using <tr> </tr> and delete tbody tag and check if that helps.
Aug 22, 2012 01:22 PM|FahadMustafa|LINK
That solves the problem, but I can't remove all the tbody tags in the project due to the project size and because I don't want to affect other team members. Just trying to get back as is it was
Aug 22, 2012 01:26 PM|Rajesh Sawant|LINK
All you need to do is inside table need to place tags like <tr> <td> next Control with runat="server" </td> </tr>
Compiler might not getting code as contorl inside control with runat="server" attribut for both.
// Some Tags
Hope this will work for you.