473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

META Tags Uniqueness for WebForms which use MasterPages

I was wondering how to go about setting the keywords for pages whichg derive
from MasterPages, and then I thought I know, lets put a runat=server on the
keywords meta tag and set the content.

<meta id="pageKeywords" runat=server name=keywords content="" />

and then use the code in the page to access this.

'set keywords

Dim kwds As System.Web.UI.HtmlControls.HtmlMeta

kwds = Page.FindControl("pageKeywords")

kwds.Attributes.Item("content") = "vb.net,asp.net,c#"

But this does not seem to work. Any ideas?, or is this a cr*p way of doing
it ?
--
Goofy
Dec 18 '06 #1
2 994
OK, I solved it Needed to use the master property

'set keywords

Dim kwds As System.Web.UI.HtmlControls.HtmlMeta

kwds = Me.Master.FindControl("pageKeywords")

kwds.Attributes.Item("content") = "vb.net,asp.net,c#"

"Goofy" <me@mine.comwrote in message
news:Os**************@TK2MSFTNGP06.phx.gbl...
>I was wondering how to go about setting the keywords for pages whichg
derive from MasterPages, and then I thought I know, lets put a runat=server
on the keywords meta tag and set the content.

<meta id="pageKeywords" runat=server name=keywords content="" />

and then use the code in the page to access this.

'set keywords

Dim kwds As System.Web.UI.HtmlControls.HtmlMeta

kwds = Page.FindControl("pageKeywords")

kwds.Attributes.Item("content") = "vb.net,asp.net,c#"

But this does not seem to work. Any ideas?, or is this a cr*p way of doing
it ?
--
Goofy

Dec 18 '06 #2
"Goofy" <me@mine.comwrote in message
news:Os**************@TK2MSFTNGP06.phx.gbl...
But this does not seem to work. Any ideas?, or is this a cr*p way of doing
it ?
http://www.howtoadvice.com/SetMetaTags
Dec 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cezary | last post by:
Hello. I was read PHP manual, but i'm not sure yet. Here is my meta tags in html: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-2"> <META HTTP-EQUIV="Expires"...
4
by: Brian | last post by:
Hi, I'm trying to use standard meta tags in an xsl doc and using cocoon as my processor. The problem is that cocoon changes for example: <meta name="keywords" content="test, test, test" /> ...
1
by: Darren Blackley | last post by:
Hi there I have documents that I want to automatically add additional meta tags to. The documents already have some meta tags and I want to keep them all together, so I want to add my new meta tags...
19
by: Christian Hvid | last post by:
Hello groups. I have a series of applet computer games on my homepage: http://vredungmand.dk/games/erik-spillet/index.html http://vredungmand.dk/games/nohats/index.html...
24
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and...
4
by: clintonG | last post by:
Anybody know how to dynamically write the meta tags using code so they are formatted on a separate line in the HTML source? Preferred or optimal framework classes that may be used in this regard? ...
2
by: yasin | last post by:
I have to refresh my site every 5 secs but I cant find my sites meta tag in my site I think there is no meta tag clearly pages includes masterpages. How can I access the meta tag of my page whit...
16
by: Edward | last post by:
Hi All, I am having huge problems with a very simple dotnet framework web page (www.gbab.net/ztest3.aspx) , it does NOT render correctly under Apple's Safari. The DIV's do not align amd float as...
4
by: King Coffee | last post by:
Hi, If I use master pages with META tags in the head section... can I still use META tag on the child pages (child pages reference the master page). I ask this question because I heard the more...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.