Home All Groups Group Topic Archive Search About

Access My.Settings from class library

Author
6 Oct 2006 7:31 AM
kkarre
Hi,
I'm partitioning my app into several tiers.
Is there a way to read/write My.Settings between tiers?
My only seem to work locally in the exe or dll...

Best regards,
kk

Author
6 Oct 2006 10:37 AM
Robinson
"kkarre" <kka***@discussions.microsoft.com> wrote in message
news:9BB2CF55-AA7E-451C-BB37-654A8E81D284@microsoft.com...
> Hi,
> I'm partitioning my app into several tiers.
> Is there a way to read/write My.Settings between tiers?
> My only seem to work locally in the exe or dll...
>
> Best regards,
> kk


Interesting question.  I noticed this too.  I'm not sure how to do it or
even if it's possible.



Robin
Author
6 Oct 2006 3:49 PM
Charlie Brown
If you are using Application settings and not user settings, you can
access them the old .net1.1 way by using [I don't have VS2005 yet :(]

strValue =
System.Configuration.ConfigurationSettings.AppSettings("strSettingName")

This will return a string, so cast it to something else if you need to.

blnValue =
CBool(System.Configuration.ConfigurationSettings.AppSettings("strSettingName"))


Robinson wrote:
Show quoteHide quote
> "kkarre" <kka***@discussions.microsoft.com> wrote in message
> news:9BB2CF55-AA7E-451C-BB37-654A8E81D284@microsoft.com...
> > Hi,
> > I'm partitioning my app into several tiers.
> > Is there a way to read/write My.Settings between tiers?
> > My only seem to work locally in the exe or dll...
> >
> > Best regards,
> > kk
>
>
> Interesting question.  I noticed this too.  I'm not sure how to do it or
> even if it's possible.
>
>
>
> Robin