Adding Meta Tags to the Head in ASP.NET 2.0 | Mana Blog... for all
Aug 18, 2010

You can easily create a HtmlMeta object and add it to the Controls collection in the HtmlHead class exposed via Page.Header. Here's a few samples:

HtmlMeta metaKeyWords = new HtmlMeta();
metaKeyWords.Name = "keywords";
metaKeyWords.Content = "keywords goes here";
this.Header.Controls.Add(metaKeyWords);

HtmlMeta metaDesription = new HtmlMeta();
metaDesription.Name = "description";
metaDesription.Content = "description goes here";
this.Header.Controls.Add(metaDesription);