Read Web Config return nothing

thiagoql

New Member
I has a 2 Web project in one solution. I want read a appsettings from web.config file but it return nothing.Below is appsettings in web.config file\[code\] <add key="DBType" value="http://stackoverflow.com/questions/14545000/MYSQL"/>\[/code\]Below is the code read the webconfig\[code\]public DBType as string = system.configuration.ConfigurationManager.AppSettings("DBType")"\[/code\]But nothing return. Even I add watch to check system.configuration.ConfigurationManager.AppSettings, it show there is no key there. Anything wrong with my webconfig file or anything in the project is wrong? Please help.Thanks a lot.
 
Back
Top