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

  • Question

  • User-1767698477 posted

    Parser Error Message: The base class includes the field 'Ctrl_categories1', but its type (controls_ctrl_categories) is not compatible with the type of control (ASP.controls_ctrl_categories1_ascx).

    Source Error:

    Line 130:                         Categories
    Line 131: </div>
    Line 132: <uc1:ctrl_categories1 ID="Ctrl_categories1" runat="server" TotalTopSubCat="4" />
    Line 133: <div style="width: 100%; background-image: url('<%=AppPath%>/images/template-default/back-hd.gif')">
    Line 134: <img alt="" src="<%=AppPath%>/image


    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ctrl_categories1.ascx.vb" Inherits="controls_ctrl_categories1" %>
    <style>
    .Item{border-right: solid 1px #dddddd; padding: 3px; vertical-align:top;}
    </style>
    <asp:DataList ID="lstCat" runat="server" RepeatColumns="2" RepeatDirection="vertical" DataKeyField="CategoryID" Width="100%" BorderWidth="0" ItemStyle-Width="50%" CellPadding="0" CellSpacing="0" ItemStyle-CssClass="Item">
        <ItemTemplate>      
            <a href="<%=AppPath%>/category_parent.aspx?catid=<%#Container.DataItem("CategoryID")%>"><b><%#Container.DataItem("CategoryName")%></b></a>         
            <br />        
            <asp:Repeater ID="rptTopSubCat" runat="server">
                <ItemTemplate><a href="<%=AppPath%>/category_subcat.aspx?catid=<%#Container.DataItem("CategoryID")%>"><%#Container.DataItem("CategoryName")%></a></ItemTemplate><SeparatorTemplate>, </SeparatorTemplate>
            </asp:Repeater>...<a href="<%=AppPath%>/category_parent.aspx?catid=<%#Container.DataItem("CategoryID")%>"></a>
            <br />      
        </ItemTemplate>
    </asp:DataList>


    This is worked fine on my local machine.  Why won't this work on my live server?  I have a control on my default page that was putting in the (10) number of websites in a given category.  I don't want them there. So I took the control, and I made a new control by adding a 1 to the control name. It worked fine locally, but gives this error message.  How is the "type" determined?  I changed everything from controls_ctrl_categories to controls_ctrl_categories1



    Saturday, September 5, 2009 9:09 PM

Answers

  • User-1767698477 posted

    I have it working now. Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 6, 2009 2:19 PM

All replies

  • User1521932406 posted

    Can you please share the contents of file ctrl_categories1.ascx.vb and also register directive on the page where this control has been declared

    I hope you did change the class name accordingly controls_ctrl_categories1

    Sunday, September 6, 2009 2:10 AM
  • User-1767698477 posted

    I have it working now. Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 6, 2009 2:19 PM