Unknown Server Tag for Custom Control
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










Leave your response!