473,387 Members | 1,535 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,387 software developers and data experts.

.Net 2, asp:Literal outside a server form = unrecognized tag prefix

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 a server form it works fine, but i probably
don't want to move the server form to encapsulate the body element,
since that would not be a correct html structure.

any ideas?
thanks
tim

Dec 15 '05 #1
3 2717
Don't think it's a compile time error. just an IDE warning. I get the
same error report in VS.Net, but it compiles fine and works.

Also, in 2.0 there's a nice new property to the page class, Header.
Page.Header.Controls.Add(), might not be useful in your case (unless you
dynamically want to add a header), but thought I'd mention it anyways.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Tim_Mac" <ti*@mackey.ie> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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 a server form it works fine, but i probably
don't want to move the server form to encapsulate the body element,
since that would not be a correct html structure.

any ideas?
thanks
tim

Dec 15 '05 #2
hi Karl,
thanks for the tip. it works great. just for any people stuck on the
same thing, it's dead easy:

this.Page.Header.Title = "Hello";

Dec 15 '05 #3
Thanks for Karl's nice suggestion.

Hi Tim,

Feel free to post here when you need any further help.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Tim_Mac" <ti*@mackey.ie>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: .Net 2, asp:Literal outside a server form = unrecognized tag
prefix
| Date: 15 Dec 2005 09:02:31 -0800
| Organization: http://groups.google.com
| Lines: 6
| Message-ID: <11**********************@f14g2000cwb.googlegroups .com>
| References: <11**********************@g47g2000cwa.googlegroups .com>
| <eU**************@TK2MSFTNGP10.phx.gbl>
| NNTP-Posting-Host: 83.141.121.205
| Mime-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-1"
| X-Trace: posting.google.com 1134666156 5538 127.0.0.1 (15 Dec 2005
17:02:36 GMT)
| X-Complaints-To: gr**********@google.com
| NNTP-Posting-Date: Thu, 15 Dec 2005 17:02:36 +0000 (UTC)
| In-Reply-To: <eU**************@TK2MSFTNGP10.phx.gbl>
| User-Agent: G2/0.2
| X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
Gecko/20051111 Firefox/1.5,gzip(gfe),gzip(gfe)
| Complaints-To: gr**********@google.com
| Injection-Info: f14g2000cwb.googlegroups.com; posting-host=83.141.121.205;
| posting-account=UaxKfw0AAAA4oMLJHydK195yIv1avAma
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!postnews.google.com!f14g2000cwb.googlegrou ps.com!not-for-mail
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:365125
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| hi Karl,
| thanks for the tip. it works great. just for any people stuck on the
| same thing, it's dead easy:
|
| this.Page.Header.Title = "Hello";
|
|

Dec 16 '05 #4

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

Similar topics

5
by: cain | last post by:
HI, I am getting the following error, and after searching for several KB articles, I have bee unsuccessful. Not even a clue. VBScript runtime (0x800A01AD) ActiveX component can't create...
0
by: ani | last post by:
I have a questionaire page , which basically has questions with multiple choice answers. I need to accomplish paging on this and there are few questions that are gender specific. According the...
9
by: Jack | last post by:
Hi, I got a asp form page where the POST ACTION = confirmation.asp page is used to save the values collected from text boxes from the form in a database. For example txtTotalOutlay field is being...
7
by: les | last post by:
I'm new to asp.net. (refugee from old asp) I have a database field "Website", which is a url and I want it be a hyperlink. I can display the url as text using: <asp:literal id="litWebsite"...
1
by: Ani | last post by:
I have a questionaire page , which basically has questions with multiple choice answers. I need to accomplish paging on this and there are few questions that are gender specific. According the...
6
by: C K | last post by:
What is less expensive/intensive on the server -dynamically writing out my rollovers to an asp:literal, or to use asp:image tags for the images. My image names will be dynamic as I am building a...
4
by: Mark Rae | last post by:
Hi, VS.NET 2003 on WinXPPro + all latest service packs etc. I have a totally standard WebForm wherein I need to include one of several HTML files according to various parameters etc. I'm...
0
by: Kenichi666 | last post by:
I am new to asp.net so please bear with me Is it possibel to set or bind a <ASP:Literal> in one page and call it from another place??? fx. Image/Image.aspx.cs sb.AppendFormat("<img...
0
by: jianxin9 | last post by:
Hi everyone, I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.