Re: Dynamic meta tags

Discussion in 'ASP .Net' started by bruce barker, Jul 20, 2004.

  1. bruce barker

    bruce barker Guest

    try correct C# syntax:

    metaKeywords.Attributes["content"] = "xxxxx";
    metaDescription.Attributes["content"] = "Testing description";

    -- bruce (sqlwork.com)



    "Venerable" <> wrote in message
    news:...
    > How do I assign dynamic meta tags to a page. When I try using the

    following code it does not work.
    > On the page I have defined as
    >
    > <meta name="description" content="description" id="metaDescription"

    runat="server" />
    > <meta name="keywords" content="keys" id="metaKeywords" runat="server" />
    >
    > and in the code behind.....
    >
    > metaKeywords.Attributes("content") = "xxxxx";
    > metaDescription.Attributes("content") = "Testing description";
    >
    > It gives me the following error....
    >
    > 'System.Web.UI.HtmlControls.HtmlControl.Attributes' denotes a 'property'

    where a 'method' was expected
    >
    > Help.....
    >
    > Thanks,
    >
    >
    >
    >
    >
    bruce barker, Jul 20, 2004
    #1
    1. Advertising

  2. bruce barker

    clintonG Guest

    Shouldn't that be -- bruce [sqlwork.com]? :)

    --
    <%= Clinton Gallagher
    A/E/C Consulting, Web Design, e-Commerce Software Development
    Wauwatosa, Milwaukee County, Wisconsin USA
    NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
    URL http://www.metromilwaukee.com/clintongallagher/



    "bruce barker" <> wrote in message
    news:...
    > try correct C# syntax:
    >
    > metaKeywords.Attributes["content"] = "xxxxx";
    > metaDescription.Attributes["content"] = "Testing description";
    >
    > -- bruce (sqlwork.com)
    >
    >
    >
    > "Venerable" <> wrote in message
    > news:...
    > > How do I assign dynamic meta tags to a page. When I try using the

    > following code it does not work.
    > > On the page I have defined as
    > >
    > > <meta name="description" content="description" id="metaDescription"

    > runat="server" />
    > > <meta name="keywords" content="keys" id="metaKeywords" runat="server" />
    > >
    > > and in the code behind.....
    > >
    > > metaKeywords.Attributes("content") = "xxxxx";
    > > metaDescription.Attributes("content") = "Testing description";
    > >
    > > It gives me the following error....
    > >
    > > 'System.Web.UI.HtmlControls.HtmlControl.Attributes' denotes a 'property'

    > where a 'method' was expected
    > >
    > > Help.....
    > >
    > > Thanks,
    > >
    > >
    > >
    > >
    > >

    >
    >
    clintonG, Jul 20, 2004
    #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. Eric Levin

    Dynamic Meta Tags

    Eric Levin, Aug 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    406
    Craig Deelsnyder
    Aug 13, 2003
  2. =?Utf-8?B?VGltOjouLg==?=

    Dynamic Refresh using meta tags????

    =?Utf-8?B?VGltOjouLg==?=, May 17, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    4,596
    =?Utf-8?B?S2VubmV0aGpl?=
    May 30, 2005
  3. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    541
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  4. Donald Firesmith

    html tags within meta tags allowed?

    Donald Firesmith, Jan 5, 2005, in forum: XML
    Replies:
    5
    Views:
    883
    Andy Dingley
    Jan 8, 2005
  5. Duane Johnson

    Meta methods to govern meta data?

    Duane Johnson, Oct 25, 2005, in forum: Ruby
    Replies:
    6
    Views:
    231
    Adam Sanderson
    Oct 28, 2005
Loading...

Share This Page