I have a bunch of key in AppSettings section of my web.config file. I want to read the key and values of those app settings using XML reader technique and populate them in the list box.
相关问题
- Sorting 3 numbers without branching [closed]
- Illegal to have multiple roots (start tag in epilo
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
The best way is to retrive webconfig values is to use System.Configuration.ConfigurationManager.AppSettings;
To retrive values of webconfig from xml reader:
Reference:http://dotnetacademy.blogspot.com/2010/10/read-config-file-using-xml-reader.html
You can just get a reference to the AppSettings NameValueCollection and iterate as follows:
Enjoy!