wpf & .config files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?RGFsZSBXaWxsaWFtcw==?=

    wpf & .config files

    Everyone:

    I'm trying to read app settings from my configuration file. The code works
    fine in winform but doesn't return anything in wpf. No error is thrown.

    This code is:
    public string GetMSSQLConnect ionString()
    {
    return
    System.Configur ation.Configura tionSettings.Ap pSettings["MsSqlConnectio nString"];
    }

    the [app].exe.config contains:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuratio n>
    <appSettings>
    <add key="MsSqlConne ctionString" value="Data
    Source=(local)\ sqlexpress;Inte grated Security=SSPI;I nitial Catalog=TEST;" />
    </appSettings>
    </configuration>

    I've done some searching and can't find anything about this. Thanks for the
    help.

    Sincerely,
    Dale

Working...