I've just noticed if there is a control that runat server and another one directly inside it, it will result in a compilation error.
eg.
If I have an asp:Label directly inside a table, it doesn't like it:
<table id="myTable" runat="server">Where the error message is CS1502: The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection .Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments<asp:Label id="myLabel" runat="server" /></table>
On the other hand, if I place the asp:Label inside a row or a cell of the table, it would work fine:
<table id="myTable" runat="server"><tr><td></table><asp:Label id="myLabel" runat="server" /></td></tr>
Any idea what's causing the problem? and if I must have a control directly inside another, how can I overcome this problem?
Thanks in advance :)