HtmlTitle title = new HtmlTitle(); title.Text = Title; PlaceHolder1.Controls.Add(title);
where the variable Title is a string value sent up from specific content page.
It turned out that because the master page's HEAD markup didn't contain any TITLE tags, ASP.NET was surreptitously adding one for me despite me adding one programmatically during the page's build. Stepping through the code when the page was loading didn't show this. It just kind of did it.
I found this hack to put a top to this strange behaviour. I put this in the HEAD tag on the master page. I'm adding the tags to keep it happy, but setting it to visible="false" so we don't see it:
<title id="Title1" visible="false" runat="server"><%-- hack to turn the auto title off --%></title>Dirty but effective.
Thanks for the info, I had this crop up today.
ReplyDeletethank you for this hack, it came up on a site i've been working on for a long time. It works perfectly.
ReplyDelete