-1

After changing the value of ApplicationSettings in web.config, the data of Settings.Default doesn't update.

I try to call

Settings.Default.Reload();

but it does not work.

Values update only after I open project settings in Visual Studio. How can I update Settings.Default values in run-time? Is this possible?

Solved
Alright, values are updated! The problem was that I tried to get the value from Settings.Default.Properties["Key"].DefaultValue, which means to get the default value that is stored in settings.settings. To get the updated value, you must use Settings.Default.Key property.

Lundin
  • 195,001
  • 40
  • 254
  • 396
  • Does that help you? http://stackoverflow.com/questions/6335931/save-and-reload-app-configapplicationsettings-at-runtime – Gigo Aug 20 '13 at 21:54
  • It helped me save change in web.conf. But after this change Settings.Default.SomeProperty have old value (because it save in settings.setting file). I want to update this value, but don't know how. – Oleg Mishenkin Aug 20 '13 at 22:20

1 Answers1

0

Try putting the Settings.Default.Reload() inside of an initialize/formLoad event

ismellike
  • 629
  • 1
  • 5
  • 14