Add elements to page

M

Miguel Dias Moura

Hello,

I am working on an Asp.Net 2.0 web site and I neet to add a few elements
to the head of my page but FROM my VB code.

The elements I need to add are:
1. Page Title
2. Meta Tags such as "Title", "Description", "Keywords", etc.

How can I do this?

Thank You,
Miguel
 
P

Paul Henderson

I am working on an Asp.Net 2.0 web site and I neet to add a few elements
to the head of my page but FROM my VB code.

Ensure that the <head> has runat="server", i.e. <head runat="server">
.... </head>, and then use Page.Header.Title = "whatever" for the title,
and create a HtmlMeta object for each <meta... tag, and add it with
Page.Header.Controls.Add(myHtmlMeta).
 

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