of course, you can save it in the web.config file or set it a const property in a public class.
then you bind the title like this:
use the property:
public class Config
{
public Config()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static string pagetitle="test";
public static string Title
{
get
{
return pagetitle;
}
}
}
in a aspx file:
<title>
<%= MyTest.Config.Title %>
</title>
if set the title in the web.config file, then you can get it use like below:
in aspx file:
<title>
<%= System.Configuration.ConfigurationSettings.AppSettings["siteTitle"] %>
</title>
in web.config file the appSettings sections add as below: