Hi Kirk,
The appsettings section of the config file should be spelled "appSettings" with a lowercase "a". Give that a try.
>I have a simple winForm with a button and text box. I'm trying to figure out how to read a file setting from an application config file. The config file is named the same as the exe (didn't work at all before that), and I have the following code in my button:
>
>
> Dim sOutput As String = " "
> sOutput = ConfigurationSettings.AppSettings("ConnectionString")
> Me.TextBox1.Text = sOutput
>
>In the debugger, sOutput is = to nothing
>
>My .config file has the following:
>
><?xml version="1.0" encoding="utf-8" ?>
><configuration>
> <AppSettings>
> <add key="ConnectionString" value "ConnectionStringText" />
> </AppSettings>
></configuration>
>
>
>It runs without any errors, but I don't get the connection string text.
>
>Thanks for any help.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi