System.Web.Compilation.AppSettingsExpressionBuilder.GetAppSetting Method

Returns a value from the <appSettings> section of the Web.config file.

Syntax

public static object GetAppSetting (string key)

Parameters

key
The key for the value to be retrieved from the configuration file.

Returns

The object associated with the key in the <appSettings> section of the Web.config file.

Remarks

This method retrieves the appropriate value from the key/value pairs in the <appSettings> section of the Web.config file. It retrieves the value by getting the System.Configuration.ConfigurationManager.AppSettings property with the key as the index. The object returned is of the type string.

Requirements

Namespace: System.Web.Compilation
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0