
Signature
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
Hi Phil,
If you added an appSetting called DBConnection
string value = ConfigurationManager.AppSettings["DBConnection"];
If you added a connectionString called DBConnection
string value =
ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString;
If you added a Setting called DBConnection
string value = Properties.Settings.Default.DBConnection;
or
string value =
ConfigurationManager.ConnectionStrings["MyNameSpace.Properties.Settings.DBConnection"].ConnectionString

Signature
Happy Coding!
Morten Wennevik [C# MVP]
> Hi, I have right clicked my project in VS2008 and added a DB Connection
> application setting.
>
> How do I access these settings from my code?
>
> I know this must be pretty simple, but I cannot see how to do it.
Phil Johnson - 10 Mar 2008 09:49 GMT
Thanks Morten,
I'm sure one of those will work!

Signature
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
> Hi Phil,
>
[quoted text clipped - 22 lines]
> >
> > I know this must be pretty simple, but I cannot see how to do it.