<add> element for <appSettings>
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
Sarađujte sa nama na GitHub-u
Izvor za ovaj sadržaj možete da pronađete u usluzi GitHub, gde možete i da kreirate i pregledate probleme i povučete zahteve. Više informacija potražite u našem vodiču za saradnike.
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tokom 2024. godine postepeno ćemo ukidati probleme sa uslugom GitHub kao mehanizam povratnih informacija za sadržaj i zameniti ga novim sistemom povratnih informacija. Dodatne informacije potražite u članku:Prosledite i prikažite povratne informacije za