I'm trying to get my key value set in the appsettings.Config file but seems not working.
This is what i wrote for that. The code is called from the constructor of an MDI file and its returning only null value. Anybody know why?
var getValue = ConfigurationSettings.AppSettings["ShowQueryTextbox"];
I also tried with ConfigurationManager.AppSettings . That too didnt work.
My AppSettings Code is as follows.
<configuration>
<appSettings>
<add key="ShowQueryTextbox" value="true"/>
</appSettings>
</configuration>
ConfigurationSettings.AppSettings are obsolete, try
ConfigurationManager.AppSettings["ShowQueryTextbox"];