Ad Code

Adding Meta Tags to the Head in ASP.NET 2.0

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";

HtmlMeta metaDesription = new HtmlMeta();
metaDesription.Name = "description";
metaDesription.Content = "description goes here";