Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - How does ConfigurationManager.AppSettings.Set stores values?

 
Thread Tools Search this Thread
Old 03-05-2006, 08:22 PM   #1
=?Utf-8?B?bmF0YXNoYQ==?=
 
Posts: n/a
Default How does ConfigurationManager.AppSettings.Set stores values?

Hello everybody,
you can use ConfigurationManager.AppSettings.Set method
(ConfigurationManager is in System.Web.Configuration namespace) to store a
modified value from web.config.
To be practical, you define a custom key in web.config:

<appSettings>
<add key="ReportButtonClick" value="0" />
</appSettings>

retrieve value of the key with Get method:

counter = ConfigurationManager.AppSettings.Get("ReportButton Click")

modify this value:

counter = counter + 1

and write it back with Set method:

ConfigurationManager.AppSettings.Set("ReportButton Click", counter)

If I access back value with Get method, I find modified value but, of
course, web.config is NOT modified.
Where does Set method stores property's value?
  Reply With Quote
Old 03-06-2006, 04:58 AM   #2
Terry Burns
 
Posts: n/a
Default Re: How does ConfigurationManager.AppSettings.Set stores values?

Cache

--
Terry Burns
http://TrainingOn.net
"natasha" <> wrote in message
news:E71D6149-E14A-4AE4-8368-...
> Hello everybody,
> you can use ConfigurationManager.AppSettings.Set method
> (ConfigurationManager is in System.Web.Configuration namespace) to store a
> modified value from web.config.
> To be practical, you define a custom key in web.config:
>
> <appSettings>
> <add key="ReportButtonClick" value="0" />
> </appSettings>
>
> retrieve value of the key with Get method:
>
> counter = ConfigurationManager.AppSettings.Get("ReportButton Click")
>
> modify this value:
>
> counter = counter + 1
>
> and write it back with Set method:
>
> ConfigurationManager.AppSettings.Set("ReportButton Click", counter)
>
> If I access back value with Get method, I find modified value but, of
> course, web.config is NOT modified.
> Where does Set method stores property's value?



  Reply With Quote
Old 03-06-2006, 11:07 AM   #3
=?Utf-8?B?bmF0YXNoYQ==?=
 
Posts: n/a
Default Re: How does ConfigurationManager.AppSettings.Set stores values?


> Cache


Good answer, Terry, but I'm not so comfortable about caching in ASP.NET
How do examine cache for my application?
And, is using cache scalable to million of users?

P.S.: a little question: I'd like to download newsgroup in OE. What is NNTP
Server? Does it require authentication? If so, do I have and type my Passport
credentials?
  Reply With Quote
Old 03-06-2006, 11:48 AM   #4
Juan T. Llibre
 
Posts: n/a
Default Re: How does ConfigurationManager.AppSettings.Set stores values?

re:
> I'd like to download newsgroup in OE. What is NNTP Server?


msnews.microsoft.com

re:
> Does it require authentication?


No, it does not.



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"natasha" <> wrote in message
news:BF21C588-9930-402B-BC1C-...
>
>> Cache

>
> Good answer, Terry, but I'm not so comfortable about caching in ASP.NET
> How do examine cache for my application?
> And, is using cache scalable to million of users?
>
> P.S.: a little question: I'd like to download newsgroup in OE. What is NNTP
> Server? Does it require authentication? If so, do I have and type my Passport
> credentials?



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco QOS MIB values required manjunatht Hardware 1 06-13-2008 01:34 PM
Values set by javascript are not reflected in serverside(.Net) rchimakurty Software 2 11-28-2007 09:07 AM
Checkbox values problem in gridview thanigaimani.thirumalai Software 0 11-09-2007 04:12 AM
How to make the form View save it's field values in Visual Stdio .NET asammoud Software 0 07-17-2007 09:57 AM
QUOTES FROM EBAY STORES misirens@hotmail.com DVD Video 1 06-19-2006 09:21 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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