Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
Adds a custom application setting.
<configuration>
<appSettings>
<add>
Syntax
<appSettings>
<add key="Key of custom setting" value="Value of custom setting" />
</appSettings>
Attributes
| Description | |
|---|---|
key |
Required attribute. Specifies the name of the key to add. |
value |
Required attribute. Specifies the value of the key to add. |
Parent element
| Description | |
|---|---|
| <appSettings> | Contains custom application settings, such as file paths, XML Web service URLs, or any other custom configuration information for an application. |
Child elements
None
Example
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>
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.