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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:41:43+00:00 2026-05-27T12:41:43+00:00

This is my first attempt to build an ASP.NET server control. Writing the control

  • 0

This is my first attempt to build an ASP.NET server control. Writing the control code was simple but I’ve run into a roadblock trying to get the control on a web page.

I built the control in one project and referenced it in another. In that second project I got the control into the Toolbox and dragged/dropped the control on the page. I can compile the web project without error, but when I browse to the page I get this error:

Parser Error Message: Unknown server tag ‘cc1:StandardControl1’.

Doing some looking around I see others having this problem for various reasons, but none seem to apply to my situation. One solution was to add the assembly to the register tag, but that isn’t an issue with my page:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="another.aspx.vb" Inherits="Educate.another" %>
<%@ Register Assembly="ServerControlSandbox" Namespace="ServerControlSandbox" TagPrefix="cc1" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc1:StandardControl1 runat="server">
        </cc1:StandardControl1>
    </div>
    </form>
</body>
</html>

Another solution said to add it to the web.config, again with the assembly attribute. But with this in my web.config I still get the error:

<controls>
        <add tagPrefix="cc1" namespace="ServerControlSandbox" assembly="ServerControlSandbox"/>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>

I’m thinking there is something simple I am missing but I see nothing wrong, judging by the examples I’ve looked at. Does anyone have any ideas? Thanks.

Also, here is the control code:

namespace ServerControlSandbox
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:StandardControl1 runat=server></{0}:StandardControl1>")]
    public class StandardControl : WebControl
    {
        [Bindable(true)]
        [Category("Appearance")]
        [DefaultValue("")]
        [Localizable(true)]
        public string Text
        {
            get
            {
                String s = (String)ViewState["Text"];
                return ((s == null) ? "[" + this.ID + "]" : s);
            }

            set
            {
                ViewState["Text"] = value;
            }
        }

        protected override void RenderContents(HtmlTextWriter output)
        {
            output.Write(Text);

            string block = "<p>Here is some text.</p>";
            output.Write(block);            
        }
    }
}
  • 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-27T12:41:43+00:00Added an answer on May 27, 2026 at 12:41 pm

    Should it just be:

    <cc1:StandardControl ID="scSomething" runat="server">
    </cc1:StandardControl>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an application using DDD techniques. This is my first attempt at a
This is my first attempt to build a json webservice using the Tornado Framework
This is my first-attempt at writing anything even slightly complicated in C++, I'm attempting
this if my first attempt at using streaming for WCF, and I am struggling
Because this is my first attempt at an extension method that seems quite useful
This is pretty strange (admitedly, this is my first attempt with python / sqlite),
First attempt to use this cool site - after searching for 2 hours: So
Saw this piece of code in a Ruby on Rails book. This first one
problem euler #5 i found the solution but i don't know why this first
I have CruiseControl.NET configured using the Mercurial source control block. When I first executed

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.