Application Setting

In an ASP .NET 2.0 Web Application Project using C#, how do I retrieve an
application setting I've created in the Project Properties designer that is
written into the <applicationSettings> section of web.config.

Please note: I'm asking about <applicationSettings>, not <appSettings> and
I'm asking about C#, so My.Settings is not the desired route here.

Thanks.
smar [ Do, 31 Januar 2008 23:50 ] [ ID #1920788 ]

Re: Application Setting

I've got it. You must instantiate the Properties.Settings object manually
and then any application settings will show up in intellisense as read-only
variables.

Properties.Settings s = new Properties.Settings();
lblCopyright.Text = s.copyright;


"Scott M." <smar [at] nospam.nospam> wrote in message
news:830F4BD6-09C4-4337-9F29-F67AD9F90022 [at] microsoft.com...
> In an ASP .NET 2.0 Web Application Project using C#, how do I retrieve an
> application setting I've created in the Project Properties designer that
> is written into the <applicationSettings> section of web.config.
>
> Please note: I'm asking about <applicationSettings>, not <appSettings>
> and I'm asking about C#, so My.Settings is not the desired route here.
>
> Thanks.
smar [ Do, 31 Januar 2008 23:56 ] [ ID #1920790 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Application Setting

Vorheriges Thema: Raise Event
Nächstes Thema: MasterPages with Ajax