• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

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
0
chandresh43
Asked:
chandresh43
  • 3
1 Solution
 
Reza RadCommented:
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"

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now