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
Count number of occurances in a string
LZMA compress / expand buffer api?
Email is being received but cannot send out
OS X Server 10.5 and OS X Laptops Joining accounts to Open Directory?
Javascript - how to add number to field name (dynamic field add script)
Mail delivery has failed
WRT54G2 Linksys router - reset password saving actual configuration
How can I dynamically switch web service addresses in .NET without a recompile?
Quick Launch Tool Bar
Cannot enter data from the query based datasheet