Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Solution: "Element '%' is not a known element. This can occur if there is a compilation error in the Web site"

Reply
Thread Tools

Solution: "Element '%' is not a known element. This can occur if there is a compilation error in the Web site"

 
 
hirebrian@hotmail.com
Guest
Posts: n/a
 
      08-14-2007
If you run accross the error message:

"Element '%' is not a known element. This can occur if there is a
compilation error in the Web site"

where '%' is the value of the tagName attribute on a web user control
you have delcared in your web.config file, then you might try
prefixing your src attribute value with the ~ (tilda) character. As
you probably know, this character tells ASP.NET to resolve the path
from the application root.

So instead of using:

<add tagPrefix="MyPrefix" tagName="MyName" src="/UserControls/
MyControl.ascx" />

use:

<add tagPrefix="MyPrefix" tagName="MyName" src="~/UserControls/
MyControl.ascx" />

A few people have posted about this and hadn't found a solution.

Anyway, it solved my problem and figured I would post it.

Thanks,
BJS

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Element 'ElephantTreeView' is not a known element. This can occur ifthere is a compilation error in the Web site, or the web.config file ismissing. Options Dave ASP .Net 0 07-05-2010 03:54 PM
C++ Gurus - Is C++ a good choice for public API(s)??? Are there cleanways to solve known problems there? arijit79@gmail.com C++ 11 06-14-2009 02:54 PM
Element is not a known element. This can occur if there is a compilation error in the Web site MK ASP .Net 5 06-27-2008 07:20 PM
Show 4 Records that occur more often...and how often they occur. Miguel Dias Moura ASP .Net 4 05-06-2004 03:40 PM
run java web start occur error Jack zhao Java 1 11-04-2003 12:52 PM



Advertisments