<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Master Pages, Themes and Navigation Controls</title><link>http://forums.asp.net/139.aspx</link><description>Discussions of MasterPages, Themes, and other page-related features. &lt;A href="http://aspadvice.com/SignUp/list.aspx?l=164&amp;amp;c=30" target=_blank&gt;Email List&lt;/A&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1903897.aspx</link><pubDate>Wed, 12 Sep 2007 00:47:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1903897</guid><dc:creator>tymberwyld</dc:creator><author>tymberwyld</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1903897.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1903897</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Umm, &amp;quot;Title&amp;quot; and &amp;quot;Description&amp;quot; are already Attributes on each Content page&amp;#39;s &amp;quot;Page&amp;quot; tag&lt;/p&gt;&lt;p&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~/Master/Site.Master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Login.aspx.cs&amp;quot; Inherits=&amp;quot;MySite.Login&amp;quot; &lt;b&gt;Title=&amp;quot;Untitled Page&amp;quot;&lt;/b&gt; &lt;b&gt;Description=&amp;quot;&amp;quot;&lt;/b&gt; %&amp;gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You&amp;#39;d just need to add Meta, Styles, and Links (JavaScript) as other properties if need be...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1536592.aspx</link><pubDate>Wed, 17 Jan 2007 18:29:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1536592</guid><dc:creator>chazcross</dc:creator><author>chazcross</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1536592.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1536592</wfw:commentRss><description>&lt;p&gt;i went a different route.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In the head of the masterpage i added a id and runat tag&lt;/p&gt;&lt;p&gt;&amp;lt;meta id="description" runat="server" name="description"&amp;nbsp;&amp;nbsp; content="Default description here" /&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;And for every page where i needed to modify this tag i used&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;HtmlMeta description = (HtmlMeta)Page.Header.FindControl(&lt;span class="st"&gt;"description"&lt;/span&gt;);
 description.Content = "description here";&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1396525.aspx</link><pubDate>Tue, 12 Sep 2006 11:16:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1396525</guid><dc:creator>LudovicoVan</dc:creator><author>LudovicoVan</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1396525.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1396525</wfw:commentRss><description>&lt;p&gt;ajw:&lt;/p&gt;&lt;p&gt;&amp;gt; I dont know whether its a good way of doing it but I added a content placeholder in the head tag of the master page which I then linked to in each of my content pages.&lt;/p&gt;&lt;p&gt;IMO, this is a great solution!&lt;/p&gt;&lt;p&gt;&amp;gt; It might not work very well for search engines though because the content doesnt sit in the head tags on the content pages because the head tags are located on the master page.&lt;/p&gt;&lt;p&gt;This problem actually does not exist and your pages are fine. Consider that master and content get merged before being sent back to the browser or crawler, so it just looks like&amp;nbsp;a regular page and the client has not even way to ascertain it is coming from a page implementing a master...&lt;/p&gt;&lt;p&gt;Hope this clearifies. -LV&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1388724.aspx</link><pubDate>Mon, 04 Sep 2006 08:19:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1388724</guid><dc:creator>ajw</dc:creator><author>ajw</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1388724.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1388724</wfw:commentRss><description>I dont know whether its a good way of doing it but I added a content placeholder in the head tag of the master page which I then linked to in each of my content pages.&amp;nbsp; It might not work very well for search engines though because the content doesnt sit in the head tags on the content pages because the head tags are located on the master page.&amp;nbsp; Even though when the page is compiled and you go view source on the page when viewing it in the web browser it does show up in the head tags.&amp;nbsp; However, if google doesnt compile the page before crawling it then this wont happen if you see what i mean.</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1388178.aspx</link><pubDate>Sun, 03 Sep 2006 12:37:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1388178</guid><dc:creator>ewschone</dc:creator><author>ewschone</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1388178.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1388178</wfw:commentRss><description>&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;ajw:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Hi, thanks for all the info.&amp;nbsp; I am still having problems integrating this into my site.&amp;nbsp; My set up is I have one master page and other content pages such as aboutus.aspx, contact.aspx, etc.&amp;nbsp; Would it be possible for you to spell it out for me where the code goes exactly.&amp;nbsp; Thanks for your patience&amp;gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;I have been playing a bit with this and you can try something like this in the page load of contact.aspx page:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myMeta = New HtmlMeta&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMeta.name = &amp;quot;description&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMeta.content = &amp;quot;This is our contact page&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page.Header.Controls.Add(myMeta)&lt;/p&gt;&lt;p&gt;Odd enough i didnt get any intellisense for myMeta&amp;nbsp;&lt;img src="http://forums.asp.net/emoticons/emotion-18.gif" alt="Huh?" /&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1387004.aspx</link><pubDate>Fri, 01 Sep 2006 11:13:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1387004</guid><dc:creator>ajw</dc:creator><author>ajw</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1387004.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1387004</wfw:commentRss><description>&lt;p&gt;Hi, thanks for all the info.&amp;nbsp; I am still having problems integrating this into my site.&amp;nbsp; My set up is I have one master page and other content pages such as aboutus.aspx, contact.aspx, etc.&amp;nbsp; Would it be possible for you to spell it out for me where the code goes exactly.&amp;nbsp; Thanks for your patience&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Andrew&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1386704.aspx</link><pubDate>Fri, 01 Sep 2006 02:29:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1386704</guid><dc:creator>lostlander</dc:creator><author>lostlander</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1386704.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1386704</wfw:commentRss><description>&lt;p&gt;Here is an article you can follow:&lt;/p&gt;&lt;p&gt;In the &lt;strong&gt;section&lt;/strong&gt;: &lt;strong&gt;&lt;em&gt;Headers, Scripts, and Meta Tags, Too&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Article_Title"&gt;&lt;a href="http://www.odetocode.com/Articles/450.aspx"&gt;ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps&lt;/a&gt;&lt;/span&gt; &lt;/p&gt;&lt;p&gt;It details the process of adding Headers and other things.&lt;/p&gt;&lt;p&gt;Hope it helps! ^_^&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1386591.aspx</link><pubDate>Thu, 31 Aug 2006 22:56:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1386591</guid><dc:creator>aspnetprogrammer</dc:creator><author>aspnetprogrammer</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1386591.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1386591</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m still new to master pages, but I know of two ways to control a master pages title or meta tags.&amp;nbsp; One was mentioned in a previous post (adding a content placeholder to the head section of the master page).&amp;nbsp; Here is another that someone showed to me:&lt;br /&gt;&lt;br /&gt;The following code in the code behind file of the master page:&lt;br /&gt;&lt;br /&gt;HtmlMeta theMetaTag = new HtmlMeta();&lt;br /&gt;theMetaTag.Attributes.Add(&amp;quot;name&amp;quot;, &amp;quot;test&amp;quot;);&lt;br /&gt;theMetaTag.Attributes.Add(&amp;quot;content&amp;quot;, &amp;quot;this is a test&amp;quot;);&lt;br /&gt;Page.Header.Controls.Add(theMetaTag);&lt;br /&gt;&lt;br /&gt;will generate this tag in the head section of the page:&lt;br /&gt;&lt;br /&gt;&amp;lt;meta name=&amp;quot;test&amp;quot; content=&amp;quot;this is a test&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;In order to give more control (if that is necessary), create a public property in the master page that controls this meta tag.&amp;nbsp; For instance, I have worked on pages where we have boolean properties to tell whether or not an optional meta tag is rendered, or string properties to tell what should go in the content attribute of a required meta tag.&lt;br /&gt;&lt;br /&gt;So if you want the meta tag to be optional, add this property to the master page:&lt;br /&gt;&lt;br /&gt;public property bool UseMetaTag&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = ViewState[&amp;quot;usemetatag&amp;quot;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return o==null?string.empty:(string)o;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; set&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState[&amp;quot;usemetatag&amp;quot;] = value;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;(I am doing this from memory so I hope I got that right.)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Then you just set it in the content page&amp;#39;s code behind:&lt;br /&gt;&lt;br /&gt;Master.UseMetaTag = true;&lt;br /&gt;&lt;br /&gt;and make the code above conditional:&lt;br /&gt;&lt;br /&gt;if (this.UseMetaTag)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; HtmlMeta theMetaTag = new HtmlMeta();&lt;br /&gt;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;As far as setting the title dynamically, I created this property in a master page and set it in the content page:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String PageTitle&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Page.Header.Title;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page.Header.Title = value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I hope this is at least somewhat helpful:)&amp;nbsp;&lt;/p&gt;&lt;p&gt;I would, of course, be interested if someone knows of a better or different way.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1386112.aspx</link><pubDate>Thu, 31 Aug 2006 15:03:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1386112</guid><dc:creator>ajw</dc:creator><author>ajw</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1386112.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1386112</wfw:commentRss><description>&lt;p&gt;I am really more interested in having a different title and meta keywords and description on each page or for each page rather than styles.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cheers&lt;/p&gt;&lt;p&gt;Andrew&lt;/p&gt;</description></item><item><title>Re: Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1386092.aspx</link><pubDate>Thu, 31 Aug 2006 14:46:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1386092</guid><dc:creator>hoopslife</dc:creator><author>hoopslife</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1386092.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1386092</wfw:commentRss><description>&lt;a href="http://west-wind.com/weblog/posts/5706.aspx"&gt;http://west-wind.com/weblog/posts/5706.aspx&lt;/a&gt;</description></item><item><title>Different head and meta tag content on each content page</title><link>http://forums.asp.net/thread/1385821.aspx</link><pubDate>Thu, 31 Aug 2006 09:31:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1385821</guid><dc:creator>ajw</dc:creator><author>ajw</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1385821.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=1385821</wfw:commentRss><description>&lt;p&gt;Hi, &lt;/p&gt;&lt;p&gt;&amp;nbsp;I am using master pages.&amp;nbsp; I want to put different head and meta (description, keywords) on each content page. How can this be done to make my site better designed for search engines.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Andrew Welch&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Abtec Network Systems&lt;/p&gt;</description></item></channel></rss>