1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

meta tags define for asp.net

Discussion in 'C, C++, C#' started by ninatsa, Jun 1, 2017.

  1. ninatsa

    ninatsa Regular Member

    Joined:
    Nov 13, 2011
    Messages:
    296
    Likes Received:
    6
  2. Repulsor

    Repulsor Power Member

    Joined:
    Jun 11, 2013
    Messages:
    775
    Likes Received:
    280
    Location:
    PHP Scripting ;)
    However you are trying to insert the metas, the output meta should be rendered like this,

    <head>
    <title>SEO Demo</title>
    <meta name="description" content="Page description - New Page description."/>
    <meta name="keywords" content="Page key words - NewPage key words." />
    </head>

    You can directly edit the header and modify it to include the meta information. Just dont mess up though. And its time you move from ASP.NET to something which is more common nowadays. Dont you think?
     
  3. ninatsa

    ninatsa Regular Member

    Joined:
    Nov 13, 2011
    Messages:
    296
    Likes Received:
    6
    i don't have meta tags now, should i insert the code you've written? the site programming is not up to me, i'm only optimizing it for seo.

    Please, give me the code for asp.net, i've inserted meta tags in html but it didn't work.

    Should i insert the code in c# to make it work properly?

    i want this for the site title and description
     
    Last edited: Jun 1, 2017
  4. ninatsa

    ninatsa Regular Member

    Joined:
    Nov 13, 2011
    Messages:
    296
    Likes Received:
    6
    protected void Page_Load(object sender, EventArgs e)
    {
    Page.Title = "Your Page Title";
    Page.MetaDescription = "Your Page Description";
    Page.MetaKeywords = "Your Page Keywords";
    }

    is it correct?

    and where to insert this code to display Site Title and Description?