Dynamic META Tags in asp.net
Dynamic META Tags in asp.net
using System.Web.UI.HtmlControls;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Description" content="lesson8 - Dynamic META Tags" /> <meta name="Subject" content="lesson8 C# Coding Tips - Dynamic META Tags" /> <meta name="Title" content="lesson8 - Dynamic META Tags in asp.net" />add namespace
using System.Web.UI.HtmlControls;
// feed the meta data HtmlMeta _metaDescription = new HtmlMeta(); _metaDescription.Name = "Description"; _metaDescription.Content = "lesson8 - Dynamic META Tags"; this.Header.Controls.Add(_metaDescription); HtmlMeta _metaSubject = new HtmlMeta(); _metaSubject.Name = "Subject"; _metaSubject.Content = "lesson8 C# Coding Tips - Dynamic META Tags"; this.Header.Controls.Add(_metaSubject); HtmlMeta _metaTitle = new HtmlMeta(); _metaTitle.Name = "Title"; _metaTitle.Content = "lesson8 - Dynamic META Tags in asp.net"; this.Header.Controls.Add(_metaTitle);
Dynamic META Tags in asp.net
Reviewed by Bhaumik Patel
on
6:53 AM
Rating: