Little tip.
To set the page title on an ASP.NET Web From using Whidbey, add runat=”server” properties to the head and title tags in your HTML:
Now, you can set the page easily using:
this.Title = "My new page title";
Simple as!
Related posts:
- How To Style Your Type With CSS Jennifer demonstrates how to use CSS to style type and...
- On-page SEO – The Google Way Mihaela recommends Google’s Search Engine Optimization Starter Guide for all...
- How To Customise Your 404 Page The 404 page is becoming an art form of its...
- How Google Determines the Relevance of a Page Google's ranking algorithm is a constantly evolving, closely guarded secret,...
- Create a Sneeze Page For Your Blog A sneeze page for your blog is all about showing...






Ooh, very nice.
September 15th, 2004 at 5:32 pm
uh, how do you do this under ASP.NET 1.1? using client-side javascript?
September 15th, 2004 at 9:22 pm
Just outta curiousity, are they putting that class in the HtmlControls or WebControls namespace?
September 16th, 2004 at 3:58 am
Andre: You need to set the page title tag as with .NET 2.0 (i.e. with a runat=”server”) but define the following in your codebehind:
Protected pageTitle As System.Web.UI.HtmlControls.HtmlGenericControl Private Sub Page_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load pageTitle.InnerText = "Title" End SubSpiff Dog: Its a string property on the Page class…
“this.” is just an easy way of referencing the current instance :) So, its the System.Web.UI.Page class technically :P
September 16th, 2004 at 8:40 am
Creating all of that code just for a title, of course, really doesn’t buy you much. You should really consider placing page titles, descriptions and keywords in the web.config file user defined section such as:
and then reference this using the script name from the web pages. This allows easy page editing in a single file.
November 23rd, 2004 at 11:27 pm