>I right clicked on my project and selected Add->New, Application Configuration File.
>
>I added the following:
>
>
>add key="WorkConnString" value="Data Source=CIS-SI-OFFICE\SQLEXPRESS;Initial catalog=BusMgr;Trusted_Connection=Yes"
>
>
>In my code I added:
>
>string sConnString = ConfigurationSettings.AppSettings["WorkConnString"];
>
>
>I get Null back.
>
>What am I doing wrong here???
Hi,
Are you sure you put the key in the 'applicationSettings' section of the config file?
Also System.Configuration.ConfigurationSettings is marked as obsolete and been replaced by System.Configuration.ConfigurationManager (but this doesn't mean your version would not work)