In this article we will discuss how we can check programmatically appSettings tag inside web.config file in SharePoint 2010.
Also you can check out:
We can check whether <appSettings> tag is presented in a SharePoint site or not.
Below is the full code:
using (SPSite site = new SPSite("http://SiteURL"))
Configuration config = WebConfigurationManager.OpenWebConfiguration("/", site.WebApplication.Name);
AppSettingsSection appSettings = config.AppSettings;
bool isAppSettingsTagPresent = appSettings.ElementInformation.IsPresent;
Hope this will be helpful to you !!!