views:

1676

answers:

4

I had a VS2008 project that was showing this warning, and I couldn't find a solution anywhere - perhaps my google-fu is weak.

In any case, the apparent solution to this is to make sure that the TagName is the name of control class.

So for my example, the following displayed the warning:

<%@ Register Src="~/path/to/Control.ascx" TagName="tagName" TagPrefix="tagprefix" %>

<tagprefix:tagName runat="server" id="controlID" />

But changing it to:

<%@ Register Src="~/path/to/Control.ascx" TagName="Control" TagPrefix="tagprefix" %>

<tagprefix:Control runat="server" id="controlID" />

fixes it.

YMMV.

+2  A: 

This sounds like a classic re-build your solution and "close and re-open Visual Studio" problem.

It's possible it may also be related to a similar problem I had which I answered at http://stackoverflow.com/questions/1474716/resolving-validation-element-xxxx-is-not-supported-warning-in-visual-stud.

Jason Snelders
A: 

YES!! Thank you so much. This error seems to come up every once in awhile for me and I can never figure it out. After reading your solution I copied and pasted the name from the class itself into the tagname attribute and it worked. I'm not sure if that forced a re-build of the designer file, or if I had a typo when I originally typed it but doing this fixed my bug. Thanks!

Adam
A: 

I had also the same problem. I tried to change the tag prefix but still it didn't work. I had a link button inside a normal html-table. After a very long time I found out that the error occurred when the link button was inside <h10>-element. The <h10> is marked in the css file so I don't understand why it gave that error.

Lillie
A: 

Apparently this can also happen if the Namespace name in the .ascx file doesn't match the namespace in the ascx.cs (codebehind) file. Just one more issue to check.

Glade Mellor