Microsoft
Software
Hardware
Network
Question : ASP.NET - use web.config setting to populate page title
I've got the following setting in my web.config file...
<appSettings>
<add key="AppTitle" value="Ralph Sheffield"/>
</appSettings>
I've seen it done before where this app setting can be utilized in markup. Something like this...
<head runat="server">
<title><% ConfigurationManager.AppSe
ttings["Ap
pTitle"].T
oString();
%></title>
</head>
But this doesn't seem to be working.
So what is the correct way to do this?
Answer : ASP.NET - use web.config setting to populate page title
use =
<%= ConfigurationManager.AppSe
ttings["Ap
pTitle"].T
oString() %>
or you can set that in code-behind as well ...say in page_load:
Page.Title = ConfigurationManager.AppSe
ttings["Ap
pTitle"].T
oString();
Random Solutions
Switch 3Com 4800G doesn't save configuration ?
How can I destroy all data on this old server?
Flash advanced Datagird sorting
How to pause a process execution in C++
Frameless and Borderless Popup Window in Flash Actionscript 2
Supressing auditd rotation from /var/log/messages
Unable to install Webmin
Failing over between Active/Active WAN connections on a Cisco Router
Stringtopostnet function not working in Crystal viewer 2008 ---
Using cfheader and cfcontent to obfuscate download path.