GetConfigSetting

Description

Returns the value of a global configuration property.

Syntax

string GetConfigSetting (string key)

Argument

Description

key

A string for the name of a global property in the <appSettings> section of the Web.Config file.

Returns

String. Returns the value of the global property passed in the key parameter.

Examples

Example 1

The following code returns “N/A” for not applicable if the global property “myKey” is not found:

string v, k
k = "myKey"

#if defined PBWEBFORM then
    v = GetConfigSetting(k)
#else
	v = "N/A"
#end if

See also