473,508 Members | 2,367 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
"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 MCMS 2002 enterprise with SP2 and VS 2005 prof. edition on a
Windows Server 2003...

Any help would be much appreciated!
Luurs

Aug 3 '06 #1
2 1687
Hi,

It's not a good idea, and IMO it's simply wrong !

you can make reference to ANY HTML tag you want in the server side by
inserting a runat=server and in the server side you declare it as
Htmlgenericcontrol.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Luurs" <je*************@akzonobel.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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 MCMS 2002 enterprise with SP2 and VS 2005 prof. edition on a
Windows Server 2003...

Any help would be much appreciated!
Luurs

Aug 3 '06 #2
Hi Ignacio,
Thanks for your reply,
>you can make reference to ANY HTML tag you want in the server side by
inserting a runat=server and in the server side you declare it as
Htmlgenericcontrol.
This is exactly what is described above, and the issue in this case is
the insertion of an EXTRA title-tag, after the head-section is
populated with all the stuff I want...
So there's one title-tag generated on server side, and a second empty
one (inserted without intension).

When you say "It's not a good idea", what exactly do you mean?

It's true you can make a reference to ANY HTML tag, so you could create
a reference for e.g. <title>. That will just work out fine, and is
actually my old/ current situation...
However, using this method for any other head-element will result in
HTML-mess...

The reason I picked the HEAD-tag is because it will clear all unwanted
"HEAD-content" in runtime, and I'm free to choose whatever I DO want to
have in there, with decent HTML-formatting...

The combination of <head id="PageHead" runta="server">
and
HtmlGenericControl pageHead =
(HtmlGenericControl)this.Page.FindControl("PageHea d");
pageHead.InnerText = "page-title, Meta/etc-stuff in here";
Does exactly that...

My question "Does anyone know why, how and when this is happening?"
(the secondly inserted title-tag) remains...

Anyone ?

Aug 4 '06 #3

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

Similar topics

2
1606
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
5953
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
2894
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
2939
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
1758
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
3787
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"...
3
2727
by: Tim_Mac | last post by:
hi, i have a master page, and i want to put an asp:literal control in the <head><title> section. but it won't build because it says it's an unrecognized tag prefix. if i put the control inside...
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....
4
2736
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. ...
1
3862
by: Luurs | 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
7120
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...
0
7323
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
7380
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...
1
7039
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
7494
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...
0
5626
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,...
0
4706
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...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.