Title Attribute in Web Content Forms Isn't Working

by ShiftUP 17. December 2018 01:16

 I couldn't readily find the solution for the title attribute for the Page tag not displaying on my content forms when I searched online so I posted the solution here.

The title attribute is used on child (content) pages to display different title tags than what is set on the master page.  An example of the purpose of the title attribute is to be able to set your index page title to 'ShiftUp Consulting - Welcome to our website' and your contact page title to be 'ShiftUP Consulting - Please let us know what you think of the website'.

The solution in this instance was the runat="server" attribute in the head tag; which of course makes perfect sense once you've spotted the issue.  The server isn't 'consulted' until your code requests it parse the head tag so it's unable to change your title tag.  After the addition of the runat="server" in the head tag all of the <% Page .... title="Your Title Here" %> started working on all the content pages.

Tags: , , , , , ,

Programming

Comments are closed