Home » General, Programming / Coding

Unknown Server Tag for Custom Control

28 July 2010 203 views No Comment

While working on my first project with Visual Studio 2010, i had to go through some weird stuffs as I tried to convert a Website project to a Website Application project.

One of the problems was with custom controls.
Here is the sample code in C# of a custom control I used for that project.

namespace CustomControls
{
public class MyTextArea : TextBox
{
//———-code here
}
}

On web.cinfig I added



On a page I use the control like this:

It compiles fine without any error. However when I view the page on browser I get the error:
Unknown Server Tag cc:MyTextArea

Note that this code worked fine in both visual studio 2005, and visual studio 2008.

Solution:
Apparently I would need to add the assembly reference on web.config



From Webcosmo Webmaster Forum http://www.webcosmoforums.com/asp/21267-unknown-server-tag-custom-control-visual-studio-2010-a.html

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.