I have just noticed recently that my page title will reset to the standard \"Untitled Page\" after I perform an asyncpostback from inside my UpdatePanel
in the main
It happens when you set the title progammatically and only when is not PostBack. Just rewrite save/load postback methods to hold the title in the viewstate bag.
protected override void LoadViewState(object savedState)
{
object[] allStates = (object[])savedState;
if (allStates[0] != null)
base.LoadViewState(allStates[0]);
if (allStates[1] != null)
Page.Title = (string)allStates[1];
}
protected override object SaveViewState()
{
object[] allStates = new object[2];
object baseState = base.SaveViewState();
string pageTitle = Page.Title;
allStates[0] = baseState;
allStates[1] = pageTitle;
return allStates;
}