locked
The base class includes the field 'headermain', but its type (Headermain) is not compatible with the type of control (ASP.include_headermain_ascx). RRS feed

  • Question

  • User-1837324441 posted

    Hi Asp.net Experts,

    I am getting this error  " The base class includes the field 'headermain', but its type (Headermain) is not compatible with the type of control (ASP.include_headermain_ascx). "


    in line :

    <TD vAlign="top" align="left" width="100%" colSpan="2"><uc1:headermain id="headermain" runat="server"></uc1:headermain></TD>

    Please find my code :

    The name space ,i am using is this 
    <%@ Register TagPrefix="uc1" TagName="Leftmain" Src="include/Leftmain.ascx" %>
    <%@ Register TagPrefix="uc1" TagName="Leftmain" Src="include/Leftmain.ascx" %>
    <%@ Register TagPrefix="uc1" TagName="Headermain" Src="include/Headermain.ascx" %>

    The code is 
    <TBODY>
    	<TR>
    		<TD vAlign="top" align="left" width="100%" colSpan="2"><uc1:headermain id="headermain" runat="server"></uc1:headermain></TD>
    	</TR>
    	<TR>
    		<TD vAlign="top" align="left" width="200" height="100%"><uc1:leftmain id="leftmain" runat="server"></uc1:leftmain></TD>
    		<TD vAlign="top" align="left" width="690" height="100%">

    Rajesh Singh
    Asp.Net Developer
    http://rajeshssingh.blogspot.com/

    Wednesday, September 9, 2009 6:09 AM

Answers

  • User-1837324441 posted

    Hi Friends ,


    I just spend little time and the solution which solved my bug is ,i have just remove the "id" from my code.

    Please find updated code below .


    <TBODY>

    <TR>

    <TD vAlign="top" align="left" width="100%" colSpan="2"><uc1:headermain runat="server"></uc1:headermain></TD>

    </TR>

    <TR>

    <TD vAlign="top" align="left" width="200" height="100%"><uc1:leftmain runat="server"></uc1:leftmain></TD>

    <TD vAlign="top" align="left" width="690" height="100%">

    <TBODY>
    <TR>
    <TD vAlign="top" align="left" width="100%" colSpan="2"><uc1:headermain id="headermain" runat="server"></uc1:headermain></TD>
    </TR>
    <TR>
    <TD vAlign="top" align="left" width="200" height="100%"><uc1:leftmain id="leftmain" runat="server"></uc1:leftmain></TD>
    <TD vAlign="top" align="left" width="690" height="100%">

    //--------------------------------------------------------------------------------------------

    if somebody is facing such problem,Please find complete solution to this blog,

    http://rajeshssingh.blogspot.com/


    Rajesh Singh,

    Asp.Net Developer

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 9, 2009 7:12 AM