Link to home
Start Free TrialLog in
Avatar of chandresh43
chandresh43Flag for India

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
ASKER CERTIFIED SOLUTION
Avatar of Reza Rad
Reza Rad
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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</title>
    <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.Attributes("content") = "A demonstration of Setting title and meta tags"