Unrecognized tag prefix or device filter 'asp'
Problem:
I have a vs2005 and I try to put a placeholdercontent control on header tag
of the master page, for adding extra header on the content page, but I still
have this error when I build: " Unrecognized tag prefix or device filter
'asp' " on tag <asp:contentplaceholder runat="server"
id="ExtraHeader"></asp:contentplaceholder>.
The page apparently work fine.
Masterpage source:
<%@ Master...
<%@ Register..
<%@ Register...
<!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>Untitled Page</title>
<LINK href="..." rel="stylesheet">
<LINK media=".." rel="stylesheet">
<LINK media="print" href=".." rel="stylesheet">
<LINK href="..." rel="stylesheet">
<LINK href="..." rel="stylesheet">
<script language="javascript" src="...."></script>
<asp:contentplaceholder runat="server"
id="ExtraHeader"></asp:contentplaceholder>
</head>
<body>
</body>
</html>
Content page source:
<%@ Page ....
<asp:Content runat=server ContentPlaceHolderID=ExtraHeader>
<LINK href="extra.css" rel="stylesheet">
</asp:Content>
Solution:
By my experience problem is in VS 2005 and XHTML validation. VS blocks itself on error and doesn't want to automaticly suggest asp tags on ctrl + space. I am not quite sure about how to fully correct it. I had just turned of validation and it continued to work fine. To turn it off right click somewhere in code and choose formating and validation. Find validation and disable show error check box. Restart everything.
It works fine on some pages while on other it doesn't. Why? I don't know. If u find answer try to mail it to me (contact)
