![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |