Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Dynamic meta tags

Reply
Thread Tools

Re: Dynamic meta tags

 
 
bruce barker
Guest
Posts: n/a
 
      07-20-2004
try correct C# syntax:

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

-- bruce (sqlwork.com)



"Venerable" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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,
>
>
>
>
>



 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      07-20-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> try correct C# syntax:
>
> metaKeywords.Attributes["content"] = "xxxxx";
> metaDescription.Attributes["content"] = "Testing description";
>
> -- bruce (sqlwork.com)
>
>
>
> "Venerable" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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,
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Meta methods to govern meta data? Duane Johnson Ruby 6 10-28-2005 03:57 AM
Dynamic Refresh using meta tags???? =?Utf-8?B?VGltOjouLg==?= ASP .Net 4 05-30-2005 03:31 PM
html tags within meta tags allowed? Donald Firesmith XML 5 01-08-2005 11:29 PM
META NAME and META HTTP-EQUIV Nym Pseudo HTML 1 09-26-2003 09:13 AM
Dynamic Meta Tags Eric Levin ASP .Net 1 08-13-2003 05:44 AM



Advertisments