I am trying to get all the keys and parameter values of a configuration file application in the page constructor so that I can use them on the page. I tried Linq, but I'm not sure how to get the values along with the keys in a simple way. right now i got all the keys and then used foreach to get all the values and i'm sure this is not a smart way. Please advice.
string[] repositoryUrls = ConfigurationManager.AppSettings.AllKeys
.Select(key => ConfigurationManager.AppSettings[key])
.ToArray();
thanks
source
share