Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Duplicate meta description

  1. #1
    Jose Rojas is offline Member
    Join Date
    Jul 2006
    Posts
    45

    Default Duplicate meta description

    How can I change the meta description to pages like shoppingcart.aspx?

    Thanks

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    For pages that don't have appconfig parameters created/specified allowing you to change these from within the admin section will need to be specified manually. Because each of the pages inherit from the SkinBase class, you can access and set these properties directly in the Page_Load method. For example, to set the meta description in the shoppingcart.aspx page, open the shoppingcart.aspx.cs page and add
    Code:
    SEDescription="your description";
    to protected void Page_Load. Alternatively, you could set the SEDescription to a string resource you've created, or a new appconfig you've created so that you would then have control of these via the admin section
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    danrawk is offline Member
    Join Date
    Apr 2011
    Posts
    45

    Default

    Quote Originally Posted by George the Great View Post
    For pages that don't have appconfig parameters created/specified allowing you to change these from within the admin section will need to be specified manually. Because each of the pages inherit from the SkinBase class, you can access and set these properties directly in the Page_Load method. For example, to set the meta description in the shoppingcart.aspx page, open the shoppingcart.aspx.cs page and add
    Code:
    SEDescription="your description";
    to protected void Page_Load. Alternatively, you could set the SEDescription to a string resource you've created, or a new appconfig you've created so that you would then have control of these via the admin section
    thanks for this. trying to root out duplicate titles and descriptions via google webmaster tools in some of the MS 9.2 page. i also added the following to rewrite the title and keywords for our invalid request page (invalidrequest.aspx.cs) within the void Page_Load section:

    Code:
       //set page title
       Page.Header.Title = "Invalid Request Page Title";
       //set page meta description
       SEDescription="Invalid Request. The action you have requested is invalid.";
    //set page meta keywords
       SEKeywords="Invalid Request";
    Last edited by danrawk; 07-04-2013 at 08:57 AM.