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 7675179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:54:11+00:00 2026-05-31T16:54:11+00:00

I wrote a custom control inherited from WebControl. (Note: not a user control). using

  • 0

I wrote a custom control inherited from WebControl. (Note: not a user control).

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace Taopi.WebComponents
{
    public class RatingLabel : WebControl
    {
        public RatingLabel()
            : base("span")
        {        }
        //...

I placed it in /App_Code, and on a web page it is registered and used as following:

<%@ Register TagPrefix="uc" Namespace="Taopi.WebComponents" %>
...
<uc:RatingLabel Rating='<%# Eval("rating") %>' runat="server" />

They run well until I move RatingLabel to /Components, which is folder cerated by me. I got an error saying “Unknown server tag uc: RatingLabel” when I try to run the website.

I believe the registration is wrong, so what modification is needed? Must custom controls be placed in the App_Code?

I have another question that where do you usually place your custom controls (except for refering a external DLL)? Are there any “suggested” locations?

  • 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-31T16:54:12+00:00Added an answer on May 31, 2026 at 4:54 pm

    I’ve run into this before. The only way I’ve found you can store code outside of the AppCode folder is to add a “Class Library” project or external DLL as you suggested (which is my preferred approach anyhow as it offers use across multiple projects).

    Alternatively, if you use a “Web Application” project type instead of a “Web site” project, you can store code anywhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a custom web part for SharePoint 2007 that loads an existing user
I'm trying to write a DataGridSeparatorColumn custom control, inherited from DataGridColumn, forcing it to
I wrote a custom server control that inherits from CompositeControl. When the control is
I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on
I wrote a custom ordering LINQ extension method as below but I think it
I need to configure a property of a custom control I wrote, specifically before
I wrote a custom Control (an auto-complete TextBox (below)) in which a ContextMenuStrip is
Ok, I created a windows control project....dropped a comboBox on it, wrote some custom
I am attempting to write a custom control. I want to allow its user
How do you control version of your static files in Django? I wrote custom

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.