<title> tag rendering on three lines
Posted on 2006-05-01
I have a master page title tag in my header
I have a pageload that sets it dynamically
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strTitle As String = Me.Page.Header.Title.ToString()
Page.Title = strTitle
This works fine but it renders the HTML code like this:
This messes up my Indexing as it sees the title as blank if it's not on one line.
My question is, "How do I render the <title></title> all on one line.
I have fiddled and can output the tag in one line but I must be rendering it too late because, ASP.NET is adding another <title> tag in over the three lines in addition to the one I output.
Any help would be most appreciated.