meta tags

Discussion in 'ASP' started by stevejhon, Oct 7, 2008.

  1. stevejhon

    stevejhon New Member

    Joined:
    Oct 7, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    i have articles uploaded from the admin side.in my website a short description uploaded from admin only wil appear for visitors and full article wil display for users and members.i am planning to display the articles in a datalist.My problem is, this articles need to come in the search engines when they search for the key words.i have little idea about meta description , keywords and all.How i can programatically set the meta key words for each article.so that wen somebody search in the search engines, they wil get redirected to the corresponding page in the datalist and corresponding article in that page.how i can accomplish this?
     
  2. shazzmerc

    shazzmerc New Member

    Joined:
    Oct 13, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi Steve,
    I have Suggest this simple code for your requirement.please put the following code in your page load event.
    Code:
              // Render: <meta name="description" content="value" />            
                            HtmlMeta meta = new HtmlMeta();
                               meta.Name = "description";
                               meta.Content = value;
                               head.Controls.Add(meta);
    
                 // Render: <meta name="keywords" content="value" />
                                 HtmlMeta meta = new HtmlMeta();
                                        meta.Name = "keywords";
                                        meta.Content = value;
                                        head.Controls.Add(meta);
    
    
    Regards;
    shazz
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice