chandresh43
asked on
meta tag and description in asp.net at run time
how change
meta tag and description in asp.net at run time
and Google friendly
meta tag and description in asp.net at run time
and Google friendly
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.beansoftware.com/asp.net-tutorials/page-title-meta-tags.aspx
let me simplify the above links with a sample:
set runat="server" in your meta tags like below:
<HEAD>
<title id="title" runat="server">Default</ti tle>
<meta name="description" content="description" id="description" runat="server" />
<meta name="keywords" content="keys" id="keywords" runat="server" />
</HEAD>
then in your code change it like below:
this.title.InnerText = "This Title"
this.keywords.Attributes(" content") = "key,word"
this.description.Attribute s("content ") = "A demonstration of Setting title and meta tags"
set runat="server" in your meta tags like below:
<HEAD>
<title id="title" runat="server">Default</ti
<meta name="description" content="description" id="description" runat="server" />
<meta name="keywords" content="keys" id="keywords" runat="server" />
</HEAD>
then in your code change it like below:
this.title.InnerText = "This Title"
this.keywords.Attributes("
this.description.Attribute