Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6849405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:59:14+00:00 2026-05-27T00:59:14+00:00

The base class includes the field ‘lbl’, but its type (web.App_Code.CustomLabelControl) is not compatible

  • 0

The base class includes the field ‘lbl’, but its type (web.App_Code.CustomLabelControl) is not compatible with the type of control (web.App_Code.CustomLabelControl).

I had done many custom controls before the same way but today I ran into this error.

I have a web application project with the below class in App_Code directory a tagprefix reference in web.config for the control in class.

What do I do now?

Web.Config

<system.web>
    <pages>
        <controls>
            <add namespace="web.App_Code" tagPrefix="CControls"/>...

Markup

<form id="form1" runat="server">
<div>
    <CControls:CustomLabelControl runat="server" OnClickText="Welcome" ID="lbl">
    </CControls:CustomLabelControl>
</div>
</form>

Class File

namespace web.App_Code
{
    public class CustomLabelControl : Control, IPostBackEventHandler, IPostBackDataHandler
    {
        private string _onClickText;

        public CustomLabelControl()
        {

        }

        public string OnClickText
        {
            get { return _onClickText; }
            set { _onClickText = value; }
        }

        public void RaisePostBackEvent(string eventArgument)
        {
            throw new System.NotImplementedException();
        }


        public bool LoadPostData(string postDataKey, NameValueCollection postCollection)
        {
            throw new System.NotImplementedException();
        }


        public void RaisePostDataChangedEvent()
        {
            throw new System.NotImplementedException();
        }
    }
}

I’ve checked these resources already:

  • The base class includes the field 'btnLogin', but its type (FoodOrder.App_Code.LinkButtonDefault) is not compatible

  • http://support.microsoft.com/kb/919284

  • Base class includes the field 'X', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:59:15+00:00Added an answer on May 27, 2026 at 12:59 am

    Try specifying the assembly name too:

    <add tagPrefix="CControls" namespace="web.App_Code" assembly="web.App_Code" />
    

    I would consider creating a dedicated namespace for your custom controls, just for the sake of clarity. Maybe something like web.App_Code.CustomControls:

    <add tagPrefix="CControls" namespace="web.App_Code.CustomControls" assembly="web.App_Code.CustomControls" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The base class includes the field 'btnLogin', but its type (FoodOrder.App_Code.LinkButtonDefault) is not compatible
The full error is The base class includes the field 'ScriptManager1', but its type
My style of coding includes the following idiom: class Derived : public Base {
I am trying to do: <input type=submit runat=server ... /> Error: The base class
when accessing foo() of base using derived class's object. #include <iostream> class base {
#include <iostream> using namespace std; class Base { public: Base(){cout <<Base<<endl;} virtual ~Base(){cout<<~Base<<endl;} virtual
I have the following code: #include <iostream> #include boost/shared_ptr.hpp using boost::shared_ptr; class Base {
The following code prints 20, i.e. sizeof(z) is 20. #include <iostream.h> class Base {
I have a model, Show and a module Utilities class Show < ActiveRecord::Base include
Fragile base class is one of the most common point that gets popped up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.