Add elements to page

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
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
 
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).
 
Back
Top