Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

unwanted extra <title> tags

Vote:
 
Hi, My site is using the Header.ascx component which autogenerates the title tag on each page. However, i see that i get an extra empty tag in my html code when i try to validate the page. any ideas why? I've removed all <title> tags except for the one in Header.ascx. my masterpage: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head id="Head1" runat="server"> <usercontrols:header id="Header" runat="server" /> <script type="text/javascript">var appInsights=window.appInsights||function(config){function t(config){i[config]=function(){var t=arguments;i.queue.push(function(){i[config].apply(i,t)})}}var i={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",r,f;setTimeout(function(){var t=u.createElement(o);t.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(t)});try{i.cookie=u.cookie}catch(y){}for(i.queue=[],r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)t("track"+r.pop());return t("set"+s),t("clear"+s),t(h+a),t(c+a),t(h+v),t(c+v),t("flush"),config.disableExceptionTracking||(r="onerror",t("_"+r),f=e[r],e[r]=function(config,t,u,e,o){var s=f&&f(config,t,u,e,o);return s!==!0&&i["_"+r](config,t,u,e,o),s}),i}({instrumentationKey:"94c8d9b4-e4ea-46e5-80b1-1043a2c35192",sdkExtension:"a"});window.appInsights=appInsights;appInsights.queue&&appInsights.queue.length===0&&appInsights.trackPageView();</script></head> <body> <form id="main" runat="server"> ..... etc. my header.ascx file: <asp:literal id="MetaTagGenerator" runat="server" /> <link rel="stylesheet" type="text/css" href="<%=Configuration.RootDir%>styles/bv.css" /> <link rel="stylesheet" type="text/css" href="<%=Configuration.RootDir%>styles/structure.css" /> <link rel="stylesheet" type="text/css" href="<%=Configuration.RootDir%>styles/Editor.css" /> <episerver:friendlyurlregistration runat="Server" /> <title><%=gettitlestring()%></%=gettitlestring()%> I've not done any changes to the code-behind file.
#11405
Aug 23, 2007 10:04
Vote:
 
If you move the title-generation to your Masterpage it will work.
#11797
Aug 27, 2007 16:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.