Retrieves values, as specified in a declarative expression, from the <appSettings> section of the Web.config file.
See Also: AppSettingsExpressionBuilder Members
The System.Web.Compilation.AppSettingsExpressionBuilder class provides access to values in the <appSettings> section of the Web.config file. The <appSettings> section of the Web.config file contains application-specific values in key/value pairs.
An application value is retrieved by assigning an expression of the form
<%$ AppSettings: appSettingsKey %>
to a property in a control declaration. The part of the expression before the colon (:) designates the type of expression to be retrieved, and the part after the colon signifies the key. The preceding expression would retrieve the following value from the Web.config file.
<add key="appSettingsKey" value="appSettingsValue"/>
When the page parser encounters an expression with the AppSettings prefix, it creates an instance of the System.Web.Compilation.AppSettingsExpressionBuilder class to handle the expression.
If the expression is encountered in a page that will be compiled, the System.Web.Compilation.AppSettingsExpressionBuilder object generates code to retrieve the specified value from the Web.config file. This code is executed during the execution of the generated page class. If the expression is encountered in a page that will not be compiled, the System.Web.Compilation.AppSettingsExpressionBuilder object returns the value from the Web.config file when the page is parsed and executed.