Posts

Showing posts from August, 2019

ASP.NET localized ASPX page titles revert to page URL after postback

You may have an ASPX where you have used a resource file to set the title in the ASPX markup, all looks good viewing the page until you click something on the page which causes a postback. < title >     < asp : Literal ID ="titleLiteral" runat ="server" EnableViewState ="false" Text =" <% $ Resources:EventLog, EventLogTitle %> " /> </ title > The page title then reverts to the URL of the page. Strange. The solution is to put all of the markup on a single line and then it works < title >< asp : Literal ID ="titleLiteral" runat ="server" EnableViewState ="false" Text =" <% $ Resources:EventLog, EventLogTitle %> " /></ title > Not sure why this is the case, but it's an easy fix at least.