How to set the meta tags dynamically in ASP.NET ?

Ranjeet_8
Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1099

HtmlHead headTag=new HtmlHead();
// Add a Description meta tag
HtmlMeta metaTag=new HtmlMeta();
metaTag.Name = "Description";
metaTag.Content = "Set your Description here.....";
headTag.Controls.Add(metaTag);

// Add a Keywords meta tag
metaTag.Name = "Keywords";
metaTag.Content = "Set your Keywords here.....!!!!";
headTag.Controls.Add(metaTag);

Comments or Responses

Login to post response