I know, this is simple, but I can't seem to remember how to do this in C# and it always takes me a while to find it each time I need it. So maybe a blog entry will help with both?
Microsoft 'replaced' the appSettings section in the web.config file with applicationSettings. To access the old appSettings properties you would use the following:
string propValue = System.Configuration.ConfigurationManager.AppSettings["property_name"];
To access the newer applicationSettings properties you should use this:
string propValue = Properties.Settings.Default.property_name;
(The VB equiv is devKey = My.Settings.property_name )
Currently rated by 0 people