how to add unique meta tags to each content page/

Discussion in 'ASP .Net' started by bashetty@gmail.com, Mar 26, 2007.

  1. Guest

    Well its a strange problem i have, some of you might already faced it
    and have a solution. I have to maintain a set of unique "search key
    words" in meta tags for each content page in my site. With master
    paging , i guess i can only have <head> tag in my MasterPage. Can any
    one let me know how to resovle this issue?
     
    , Mar 26, 2007
    #1
    1. Advertising

  2. I keep this in my Global.asax:

    public static void PlaceMetaTags(System.Web.UI.Page page, string
    keyWordList, string descriptionList)
    {
    HtmlHead head = (HtmlHead)page.Header;
    HtmlMeta hm = null;
    hm = new HtmlMeta();
    hm.Name = "keywords";
    hm.Content = keyWordList;
    head.Controls.Add(hm);
    hm = new HtmlMeta();
    hm.Name = "description";
    hm.Content = descriptionList;
    head.Controls.Add(hm);
    }

    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "" wrote:

    > Well its a strange problem i have, some of you might already faced it
    > and have a solution. I have to maintain a set of unique "search key
    > words" in meta tags for each content page in my site. With master
    > paging , i guess i can only have <head> tag in my MasterPage. Can any
    > one let me know how to resovle this issue?
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Mar 28, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Donald Firesmith

    html tags within meta tags allowed?

    Donald Firesmith, Jan 5, 2005, in forum: XML
    Replies:
    5
    Views:
    906
    Andy Dingley
    Jan 8, 2005
  2. Jake Barnes
    Replies:
    1
    Views:
    424
    Andy Dingley
    Nov 14, 2005
  3. Rolf Welskes
    Replies:
    7
    Views:
    969
    Steven Cheng[MSFT]
    Aug 22, 2006
  4. Replies:
    4
    Views:
    412
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 27, 2007
  5. Darren Blackley

    Help - Add additional meta tags using JS

    Darren Blackley, Aug 26, 2003, in forum: Javascript
    Replies:
    1
    Views:
    100
    Darren Blackley
    Aug 26, 2003
Loading...

Share This Page