HTMLMETA

G

Guest

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top