O0CaoO
O0CaoO

Reputation: 121

How to update appsettings from an aspx page?

I have customer specific settings in a custom.config which links back to web.config.

What I want to accomplish is to load the settings from appsettings section in custom.config into setup.aspx page. The settings will be loaded into textbox, dropdown list etc. After the user makes changes then save it back to custom.config. Is this possible? It seems to me that the appSettings section is readonly. What would be best approach to accomplish this?

Upvotes: 0

Views: 499

Answers (2)

Azhar
Azhar

Reputation: 20678

See the links .... But if you want to change or update the values frequently then you should use Database rather then configuration file..

AppSettings In web.config

update web.config file appsettings value

Upvotes: 0

Ilia G
Ilia G

Reputation: 10221

That sounds like you need a database... config files are not really meant to store user data. Editing web.config generally causes app pool restart, not sure if custom config works the same way but I would not be surprised.

Upvotes: 4

Related Questions