473,756 Members | 9,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
"Unrecogniz ed 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 "Unrecogniz ed 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"i n the .aspx file, and in the
codebehind something like:
HtmlGenericCont rol pageHead =
(HtmlGenericCon trol)this.Page. FindControl("Pa geHead");
pageTitle.Inner Text = "page-title, Meta/etc-stuff in here";
This works great, and it also removes the annoying
<meta content="Micros oft Visual Studio 7.0" name="GENERATOR ">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
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 3877
In article <11************ *********@s13g2 000cwa.googlegr oups.com>, Luurs
<je************ *@akzonobel.com writes
>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
"Unrecognize d 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 "Unrecogniz ed 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
disadvantage s so far...
The desired solution would be something like this:
<head id="PageHead" runta="server"i n the .aspx file, and in the
codebehind something like:
HtmlGenericCon trol pageHead =
(HtmlGenericCo ntrol)this.Page .FindControl("P ageHead");
pageTitle.Inne rText = "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 contentplacehol der 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="Micros oft Visual Studio 7.0" name="GENERATOR ">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_targe tSchema">
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
1626
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, except when I call a function in an onclick it gives an 'object expected' error. Here's the popup function (dopopup) and the function I'm calling (renderData): function dopopup(Value,Field,x,y) { popCode=''; popCode+='<html>\n<head>\n';
2
5970
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 a group of Sales people, the customers they deal with and the business they transact with them. I've got my head around all the tables & some of the basic Query structures OK and am beginning to delve into creating the forms I need to be able...
2
2907
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 a limitation for smart device application? Is there any forum/group available for Smart device application developer?
2
2947
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 error on every single aspx page: 'asp' is an unrecognized tag prefix or device filter I'm baffled. The solution builds fine, and each page seems to build
1
1778
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 the IPageContent interface. A page (aspx) must then be created that loads (using Page.LoadControl) the page template, and the page content. The page content adds itself to the page template. The page template is then added to the aspx's control...
6
3802
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" type="ComIT.Applications.Common.ConfigurationSections.MyHandler" allowLocation="true" allowDefinition="Everywhere" /> </configSections>
0
371
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. The site builds fine and displays fine. Any idea what this error means
4
2756
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. It should put a blue and yellow box on the page with "This is a test" as part of the picture. But what I get is a broken Gif. The other problem is that I can't view the source???? The view source is disabled for this page. What causes this?
0
1470
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 HTML-output isn't that pretty (<span>'s in the head-section...) it works fine with browsers, crawlers. It never REALLY was an issue...
0
9117
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9679
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8542
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7078
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4955
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.