First of all, I do not recommend adding your settings to web.config. If you want to update Sitecore, you must manually combine your web.config.
If you still want to add settings to web.config, you need to have something like:
<configuration> ..... <appSettings> <add key="YourSeetings" value="your value" /> ... </appSettings> ..... </configuration>
From c # code you need to use
ConfigurationManager.AppSettings["YourSeetings"]
If you have your own settings in the / configuration / sitecore / settings section, you need to use C # code:
Sitecore.Configuration.Settings.GetSetting("yoursettingsname");
Your configuration file will look like this:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore> <settings> <setting name="YourSettingsFieldName" value="{1EPR25B2-98C6-45BF-B9E4-824ECAAEF499}" /> </settings> </sitecore> </configuration>
source share