473,394 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problems creating head section - Unrecognized tag prefix or device filter 'asp'

Hi All,

I've been using a asp-label in the HTML <headsection for quite some
time in order to dynamically generate meta-keywords,-description, css
and js references.
Though the actual HTML-output isn't that pretty (<span>'s in the
head-section...) it works fine with browsers, crawlers. It never REALLY

was an issue...
However, in VS2005 this method is considered to be an error
"Unrecognized tag prefix or device filter 'asp'". I do understand it's
because the label is not placed within the <FORM>, etc, etc...
Still, Is there a good reason why "suddenly" the method is thought to
be an "Error"?
Will it have any consequences, now or in the near future if I just
ignore the error-warning and continue using the method?
If NOT, can I filter out this specific error from the error-list
(Without loosing the "Unrecognized tag prefix or device filter
'asp'"-error for other occasions)?
If YES, is there a good alternative available?
The MSDN solution
http://msdn.microsoft.com/library/en...9a042924-3a16-...

is just another way of creating the same problem.
I did quite some searching/trying out myself, but all option had their
disadvantages so far...
The desired solution would be something like this:
<head id="PageHead" runta="server"in the .aspx file, and in the
codebehind something like:
HtmlGenericControl pageHead =
(HtmlGenericControl)this.Page.FindControl("PageHea d");
pageTitle.InnerText = "page-title, Meta/etc-stuff in here";
This works great, and it also removes the annoying
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
from the head section!
However, somehow a second (empty) <title></titleis inserted just
before </head>!
It, needs no explanation that this is unwanted behavior...
Is it a ASP.Net issue or a CMS-feature?
Does anyone know why, how and when this is happening?
I really want to move our VS 2005 solution to runtime, but feel
uncertain about the current situation (as described on top of this
post).
I'm using VS 2005 prof. edition on a Windows Server 2003...
Any help would be much appreciated!
Luurs

Aug 3 '06 #1
1 3854
In article <11*********************@s13g2000cwa.googlegroups. com>, Luurs
<je*************@akzonobel.comwrites
>Hi All,

I've been using a asp-label in the HTML <headsection for quite some
time in order to dynamically generate meta-keywords,-description, css
and js references.
Though the actual HTML-output isn't that pretty (<span>'s in the
head-section...) it works fine with browsers, crawlers. It never REALLY
was an issue...
Literal controls are more useful for this sort of thing as they do not
add anything. Whatever you set the Text property to, that's what will be
output. No <span>, no nothing ;-)
>However, in VS2005 this method is considered to be an error
"Unrecognized tag prefix or device filter 'asp'".
Well known bug in VS2005. Usually cured by either deleting the schema
files, or just keeping the master page open in the IDE.

Either way, you can safely ignore the error as long as your pages
compile OK.
I do understand it's
because the label is not placed within the <FORM>, etc, etc...
That's not the reason. Not all server controls have to be inside a form.
>Still, Is there a good reason why "suddenly" the method is thought to
be an "Error"?
Bug
>Will it have any consequences, now or in the near future if I just
ignore the error-warning and continue using the method?
No
>If NOT, can I filter out this specific error from the error-list
(Without loosing the "Unrecognized tag prefix or device filter
'asp'"-error for other occasions)?
If YES, is there a good alternative available?
The MSDN solution
http://msdn.microsoft.com/library/en...9a042924-3a16-...
Don't know what that is as the link you provided was incomplete,
however, the two suggestions above usually fix it.
>is just another way of creating the same problem.
I did quite some searching/trying out myself, but all option had their
disadvantages so far...
The desired solution would be something like this:
<head id="PageHead" runta="server"in the .aspx file, and in the
codebehind something like:
HtmlGenericControl pageHead =
(HtmlGenericControl)this.Page.FindControl("PageHe ad");
pageTitle.InnerText = "page-title, Meta/etc-stuff in here";
Painful way to do this. The page title can be set using...

Page.Title = "My page";

if you want to do it dynamically, or simply using the Title attribute of
the @Page directive if it's static.

Meta tags, CSS, Javascript, etc can all be added to the header simply by
adding a contentplaceholder inside the <headtag and putting your meta
tags, etc inside the content control on the .aspx page. It's much
simpler than the messy way MS implemented it.
>This works great, and it also removes the annoying
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
from the head section!
Do it the way I suggested and you won't get these either. You'll only
get exactly what you want in there.
>However, somehow a second (empty) <title></titleis inserted just
before </head>!
You don't need to add a <titletag, just set Page.Title and the
framework will add the tag for you. I suspect you are adding your own
tag and the framework is adding its own, resulting in two.
>It, needs no explanation that this is unwanted behavior...
Is it a ASP.Net issue or a CMS-feature?
Does anyone know why, how and when this is happening?
No, but try it the way I suggested and see if it still happens. If yes,
then it's not an ASP.NET issue as I do this all the time and it works
fine.
>I really want to move our VS 2005 solution to runtime, but feel
uncertain about the current situation (as described on top of this
post).

I'm using VS 2005 prof. edition on a Windows Server 2003...
Me too. HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Aug 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sharon | last post by:
Hi y'all, I'm trying to create a customized context menu using the DHTML Popup object. The HTML that makes up the body of the popup is created in a variable named 'popCode'. Works like a charm,...
2
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks...
2
by: Sreedharan | last post by:
Hi, I am using C#. Is there no Join method (in thread class)for Smart device application? And Also i noticed that Name property isn't there(got compiler error when trying to use them) Is this...
2
by: Roger Helliwell | last post by:
Hey guys, Just sat down this morning to continue on a project (using Whidbey) I've been working on for 3 months. To my surprise (which quickly turned to horror) I started receiving the following...
1
by: Hasani \(remove nospam\) | last post by:
The way the system works is, you create a user control (ascx) that will be a template and must implement the interface IPageTemplate. You then create one or more user controls (ascx) that implement...
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
0
by: Alan Silver | last post by:
Hello, I have a master page that has the following... <asp:contentplaceholder id="cphHead" runat="server" /> VWD puts a red line under the "asp" and gives me the error shown in the header....
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
0
by: jeroen.luursema | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.