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

HTMLMETA

I have the following code in my master page:

Page.Title = mTitle
Dim metaDesc As New HtmlMeta
metaDesc.Name = "Description"
metaDesc.Content = mDesc
Page.Header.Controls.Add(metaDesc)
Dim meta As New HtmlMeta
meta.Name = "Keywords"
meta.Content = mkey
Page.Header.Controls.Add(meta)
Dim metaAuthor As New HtmlMeta
metaAuthor.Name = "Author"
metaAuthor.Content = "Me, myself and I"
Page.Header.Controls.Add(metaAuthor)
For some reason when i load the page the title comes after the meta tag
but I do request it first. My question is since I am dynamically
setting the title and other meta tags to the page(depending on the page
they are on) how can I get the title first instead of last.
Also one other question not sure if this can be answered - does it
really matter if the title is last or first?
Thanks for the help.

Jul 26 '06 #1
1 1374
For some reason when i load the page the title comes after the meta tag
but I do request it first. My question is since I am dynamically
setting the title and other meta tags to the page(depending on the page
they are on) how can I get the title first instead of last.
I suspect this is because when you set the title you are setting an
attribute, not telling the application to output the text at that time. The
application might perform actions after your code in this order:

Add the head node to the html node
Add the title node to the head node
Add any specified meta nodes to the head node

Therefore the order in which you set the values of the above is insignificant.
Also one other question not sure if this can be answered - does it
really matter if the title is last or first?
No, the broswer should treat all the information independently.

Jul 26 '06 #2

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

Similar topics

1
by: Miguel Dias Moura | last post by:
Hello, I am adding a MetaTag from my .pasx.vb code: Dim metaTag As New HtmlMeta() metaTag.Name = "Title" metaTag.Content = "My Web Site" Page.Header.Controls.Add(metaTag) Later in my code I...
1
by: needin4mation | last post by:
Hi, I have a metatag description like (this is in my masterpage) <meta name="description" id="MyMETADesc".... but this *inline* code fails: (this is in a contentpage based upon the master)...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
13
by: sck10 | last post by:
Hello, I am trying to find the option VS2K5 that will automatically change HtmlMeta hm=new HtmlMeta(); or HtmlMeta hm = new HtmlMeta(); to HtmlMeta hm = new HtmlMeta(); What I would...
5
by: Jens Jensen | last post by:
Hello, Does anyone know anything about how to optimise asp.net 2.0 pages for search engines? I'm thinking of a programmatic way of mapping sitemap structure to pages meta tags. Well it...
2
by: Dariusz Tomon | last post by:
Hello How can I build meta tags dynamically? Please provide an example. Thank you Dariusz Tomon
3
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm well into a project at the moment which uses a MasterPage. I'm also using seperate code-behind files for each page (C#). I just realised that the MasterPage doesn't give you a...
4
by: bashetty | last post by:
Well its a strange problem i have, some of you might already faced it and have a solution. I have to maintain a set of unique "search key words" in meta tags for each content page in my site. With...
0
by: rsdev | last post by:
Hi, I am new to ASP.NET and I am trying to build a CMS application using theBeerHouse SK. I am adapting the Datareader to collect information from an SQL database and send it to an HtmlHeader. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.