So you don’t want to have to type your page title onto each and every page of your website, especially if it changes. I understand and have a fix.
In the ASPX file, in the HTML editor change the
<title runat="server" id="pageTitle"></title>
Then in your ASPX.VB file, yes you can do a version of this in your C# code too, put the following declariation in:
Protected WithEvents pageTitle AsSystem.Web.UI.HtmlControls.HtmlGenericControl
This will give you access to the title tag as a generic control. You can then access it by addressing it with
pageTitle.InnerHTML = "Something"
My default value is to use the assembly information: Dim version As String Dim Title As String With
System.Reflection.Assembly.GetExecutingAssembly Title = CType(.GetCustomAttributes(GetType(AssemblyTitleAttribute), False)(0), AssemblyTitleAttribute).Title version = .GetName().Version.ToString End With pageTitle.InnerText = Title & " (" & version & ")"
In this manor, everytime I update my assembly file, I update all of my pages.