![]() |
|
|
|||||||
![]() |
ASP Net - How does ConfigurationManager.AppSettings.Set stores values? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Posts: n/a
|
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? |
|
|
|
#2 |
|
Posts: n/a
|
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? |
|
|
|
#3 |
|
Posts: n/a
|
> 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? |
|
|
|
#4 |
|
Posts: n/a
|
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? |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |