I had set of ASPX pages in which each page had different titles, but I want to put default title for pages which don't have a title. The default title must be configurable.
If this is classic ASP.NET (not MVC) and you are using MasterPage
then you can set default title in Page_Load
event in MasterPage
:
protected void Page_Load(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Page.Title))
{
Page.Title = ConfigurationManager.AppSettings["DefaultTitle"]; //title saved in web.config
}
}