Posted By

leonbda on 01/21/09


Tagged

header title meta


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
emregulcan


Page header - Dinammically place meta tags and title in header


 / Published in: C#
 

  1. this.Page.Title = dr1["page_title"].ToString();
  2.  
  3. //keywords
  4. HtmlMeta keywords = new HtmlMeta();
  5. keywords.Name = "keywords";
  6. keywords.Content = dr1["site_keywords"].ToString();
  7. Page.Header.Controls.Add(keywords);
  8.  
  9. //description
  10. HtmlMeta description = new HtmlMeta();
  11. description.Name = "description";
  12. description.Content = dr1["site_description"].ToString();
  13. Page.Header.Controls.Add(description);

Report this snippet  

You need to login to post a comment.