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

  • SEARCH
  • Home
  • 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 3599160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:20:00+00:00 2026-05-18T20:20:00+00:00

I am learning custom controls and just finished my first one. The problem is

  • 0

I am learning custom controls and just finished my first one. The problem is that I am struggling to register it in my web config and have the compiler recognize it. Right now this results in a YSOD about the reference to the control.

note: exact error – Error Unknown server tag ‘cc:LblTextBox’.

Thank you!

Web Config

//..
//..
     <pages>
       <controls>
         <add tagPrefix="cc" namespace="Controls.Server"/>
       </controls>
     </pages>
</system.web>

The control code-behind

namespace Controls.Server
{
    public class LblTextBox : CompositeControl
    {
       //...
    }
}

mark-up

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ControlsMain.aspx.cs" Inherits="Pages_ControlsMain" Trace="true" %>

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head runat="server">
     <title>Controls Area</title>
 </head>
 <body>
    <form id="form1" runat="server">
    <div>
          First attempt at a simple composite control <br />
         <cc:LblTextBox ID="ccLblTbHybrid" runat="server" LabelText="Name:" />
   </div>
   </form>
 </body>

  • 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-18T20:20:01+00:00Added an answer on May 18, 2026 at 8:20 pm

    The issue stemmed from setting up the project as an ASP.Net Web Site

    This has a drawback because the name of your assembly is not known till runtime.

    I recreated the project as a ASP.Net Web Application, allowing for procompilation of the DLLs …. thus giving me the ability to give the project a namespace.

    I then added abe’s suggestion into the entry and all is working now

    <add tagPrefix="cc" namespace="Controls.Server" assembly="DevLore"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning custom controls and just finished my first one. The problem is
I am just learning about app.config in respect of creating custom sections. I have
I'm just learning Java... I have 2 custom classes. One is a Fraction and
I'm just learning about custom controls in C# (window forms) I've created the below
I am learning PyQt and wonder if one can create custom/owner draw control like
When learning C# for the first time, I was astonished that they had no
I am currently learning to create custom controls in WPF. I successfully created a
Climbing the learning mountain of TVirtualTreeView, I'm attempting to create a custom descendant that
I am learning JQuery. I have a need to create a custom control. This
I am in the process of learning how to implement custom controls by inheriting

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.