Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ConfigurationSettings

Reply
Thread Tools

ConfigurationSettings

 
 
Matthias Kn÷chlein
Guest
Posts: n/a
 
      03-06-2005
Hi !!

How can I access ConfigurationSettings in a server control ?

thanxs


 
Reply With Quote
 
 
 
 
=?Utf-8?B?S29zdGFkaW4gS29zdG92?=
Guest
Posts: n/a
 
      03-06-2005
using System.Configuration;

ConfigurationSettings.AppSettings["mySetting"];

In Web.config you should have:
<add key="mySetting" value="myValue">

"Matthias Kn├Âchlein" wrote:

> Hi !!
>
> How can I access ConfigurationSettings in a server control ?
>
> thanxs
>
>
>

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      03-06-2005
Remember, in ASP.NET 2.0 this changes to :

VB.NET :
ConfigurationManager.AppSettings("mySetting")

C# :
ConfigurationManager.AppSettings["mySetting"];




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa˝ol
Ven, y hablemos de ASP.NET...
======================

"Kostadin Kostov" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> using System.Configuration;
>
> ConfigurationSettings.AppSettings["mySetting"];
>
> In Web.config you should have:
> <add key="mySetting" value="myValue">
>
> "Matthias Kn÷chlein" wrote:
>
>> Hi !!
>>
>> How can I access ConfigurationSettings in a server control ?
>>
>> thanxs
>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?Sm9obnNvbiBTbWl0aA==?=
Guest
Posts: n/a
 
      03-07-2005

VB.NET :
ConfigurationManager.AppSettings("connSetting")

C# :
ConfigurationManager.AppSettings["connString"];


"Juan T. Llibre" wrote:

> Remember, in ASP.NET 2.0 this changes to :
>
> VB.NET :
> ConfigurationManager.AppSettings("mySetting")
>
> C# :
> ConfigurationManager.AppSettings["mySetting"];
>
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espa├▒ol
> Ven, y hablemos de ASP.NET...
> ======================
>
> "Kostadin Kostov" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> > using System.Configuration;
> >
> > ConfigurationSettings.AppSettings["mySetting"];
> >
> > In Web.config you should have:
> > <add key="mySetting" value="myValue">
> >
> > "Matthias Kn├Âchlein" wrote:
> >
> >> Hi !!
> >>
> >> How can I access ConfigurationSettings in a server control ?
> >>
> >> thanxs
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      03-07-2005
Why did you post the exact same syntax I did ?



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa˝ol
Ven, y hablemos de ASP.NET...
======================

"Johnson Smith" <Johnson http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> VB.NET :
> ConfigurationManager.AppSettings("connSetting")
>
> C# :
> ConfigurationManager.AppSettings["connString"];
>
>
> "Juan T. Llibre" wrote:
>
>> Remember, in ASP.NET 2.0 this changes to :
>>
>> VB.NET :
>> ConfigurationManager.AppSettings("mySetting")
>>
>> C# :
>> ConfigurationManager.AppSettings["mySetting"];
>>
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espa˝ol
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "Kostadin Kostov" <(E-Mail Removed)> wrote in
>> message news:(E-Mail Removed)...
>> > using System.Configuration;
>> >
>> > ConfigurationSettings.AppSettings["mySetting"];
>> >
>> > In Web.config you should have:
>> > <add key="mySetting" value="myValue">
>> >
>> > "Matthias Kn÷chlein" wrote:
>> >
>> >> Hi !!
>> >>
>> >> How can I access ConfigurationSettings in a server control ?
>> >>
>> >> thanxs
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ConfigurationSettings.AppSettings vs. IIS Application =?Utf-8?B?Sk1E?= ASP .Net 4 06-30-2004 03:17 PM
Extracting settings from config file outside 'ConfigurationSettings.AppSettings' ASP .Net 3 02-23-2004 06:06 AM
ConfigurationSettings vs Application State [myfirstname] ASP .Net 1 02-19-2004 01:13 PM
How Do I get ConfigurationSettings from the calling assembly? Rob Mayo ASP .Net 6 09-22-2003 06:27 PM
RE: ConfigurationSettings.AppSettings Error Bassel Tabbara [MSFT] ASP .Net 1 07-07-2003 08:31 PM



Advertisments