Return to Snippet

Revision: 31586
at January 14, 2011 14:41 by housecor


Updated Code
<configuration>
	<appSettings>
		<add key="websiteName" value="My New Website"/>
	</appSettings>

Then, to use it, be sure to import:
using System.Configuration

And in the body: System.Configuration.ConfigurationManager.AppSettings["websiteName"];

OR, in web form, just use Expression syntax:
<asp:Literal Text="<%$AppSettings: websiteName %>" />

Revision: 31585
at January 14, 2011 14:39 by housecor


Updated Code
<configuration>
	<appSettings>
		<add key="websiteName" value="My New Website"/>
	</appSettings>

Then, to use it, be sure to import:
using System.Configuration

And in the body: System.Configuration.ConfigurationManager.AppSettings["websiteName"];

OR, better yet, just use Expression syntax:
<asp:Literal Text="<%$AppSettings: websiteName %>" />

Revision: 31584
at September 11, 2010 00:57 by housecor


Updated Code
<configuration>
	<appSettings>
		<add key="websiteName" value="My New Website"/>
	</appSettings>

Then, to use it, be sure to import:
using System.Configuration

And in the body: System.Configuration.ConfigurationManager.AppSettings["FinalReportSourceTest"];

Revision: 31583
at September 9, 2010 04:07 by housecor


Initial Code
<configuration>
	<appSettings>
		<add key="websiteName" value="My New Website"/>
	</appSettings>

Then, to use it, be sure to import:
using System.Configuration

And in the body: ConfigurationManager.AppSettings["websiteName"]; or perhaps ConfigurationSettings.AppSettings["FinalReportSourceTest"];

Initial URL

                                

Initial Description

                                

Initial Title
set and access global config vars in web.config

Initial Tags

                                

Initial Language
C#