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" <> wrote in
message news:156AC491-B015-47D0-B4FA-...
> 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" <> wrote in
> message news:156AC491-B015-47D0-B4FA-...
> > 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 > wrote in message
news:CBE2A802-E8DD-4800-AE13-...
>
> 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" <> wrote in
>> message news:156AC491-B015-47D0-B4FA-...
>> > 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
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57