Wednesday, February 9, 2011

How to add meta tags programmatically


add meta tags programmatically

you will have to create object of htmlmeta and set values in it and then add it to page's header.
below code will help you in creating meta tags programmatically.

  private void createMetaTags(string content)
        HtmlMeta hm = new HtmlMeta();
        HtmlHead head = (HtmlHead)Page.Header;
        hm.Name = "Keywords";
        hm.Content = content;

Solution By: Rajesh Rolen

Share This!

No comments:

Powered By Blogger · Designed By Seo Blogger Templates