Reputation: 73
This is my web.config
code
<add key="SiteLogoPath" value="#SiteLogoPath#" />
This is my Template code
<p>#SiteLogoPath#</p>
Upvotes: 2
Views: 700
Reputation: 1768
Assuming your question really boils down to inserting an app setting into a Razor template:
In web.config
:
<appSettings>
<add key="SiteLogoPath" value="#SiteLogoPath#" />
</appSettings>
In your Razor template:
@System.Web.Configuration.WebConfigurationManager.AppSettings["SiteLogoPath"]
Upvotes: 3