description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: <add> element for <appSettings> |
<add> element for <appSettings> |
05/01/2017 |
|
8734efdc-00f6-4a65-bba6-084c5bc65246 |
Adds a custom application setting.
<configuration>
<appSettings>
<add>
<appSettings>
<add key="Key of custom setting" value="Value of custom setting" />
</appSettings>
Description | |
---|---|
key | Required attribute. Specifies the name of the key to add. |
value | Required attribute. Specifies the value of the key to add. |
Description | |
---|---|
<appSettings> | Contains custom application settings, such as file paths, XML Web service URLs, or any other custom configuration information for an application. |
None
The following example shows how to add a custom configuration setting for the application's name:
<appSettings>
<add key="ApplicationName" value="MyApplication" />
</appSettings>
The following example uses the <add>
element to define two compatibility settings in an ASP.NET application:
<appSettings>
<add key="AppContext.SetSwitch:Switch.System.Globalization.NoAsyncCurrentCulture" value="true" />
<add key="AppContext.SetSwitch:Switch.System.Uri.DontEnableStrictRFC3986ReservedCharacterSets" value="true" />
</appSettings>