• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • 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
  • 3
1 Solution
Reza RadConsultant, TrainerCommented:
Reza RadConsultant, TrainerCommented:
let me simplify the above links with a sample:

set runat="server" in your meta tags like below:

    <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" />

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"

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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