How to Make Strongly-typed References to Web.Config?
I don't do much asp.net, but if this StackOverflow answer applies then you could just do this:

using Settings = MyProject.Namespace.Properties.Settings;

var loadedCode = Settings.Default.LoadedCode;


Like this other StackOverflow answer is saying:


  We prefer to use Properties.Settings (aka. settings.settings) because it's strongly typed.


Now I know for a fact that this works with an app.config, but it might not work with a web.config file... but I think it's worth trying.



Alternatively, this Haacked article describes how to use the configuration API to define your own ConfigurationSection classes, which would be the ultimate way to address this issue. Might be overkill if the above works though.