Saturday, June 7, 2008

Dynamically adding Meta-Tags

According to SEO's Meta -tags are dead .
Its official now that Search engines now give their own tags to every page instead of reading meta tags on every page .
But still if you want to add meta tags dynamically to your page then here is the code .

At the page_load event write the following code
protected void Page_Load(object sender, EventArgs e)
{
HtmlMeta keywords = new HtmlMeta();
keywords.Name = "keyword";
keywords.Content =" metatag";
Header.Controls.Add(keywords);
}
Well the above code is quiet easy and can be easily understood .

No comments: