Tarik
Tarik

Reputation: 81781

Change Key/Value pairs in Web.config

How can I change a key's value in web.config which is defined between appSettings tags at code behind in asp.net

Thanks..

Regards...

Upvotes: 2

Views: 2257

Answers (1)

Colin Biggs
Colin Biggs

Reputation:

As of .Net 2.0 there is an API for modifying the web config at runtime.

Note however that any changes made to the web config will cause the web application to restart, so you want to use this as infrequently as possible.

Upvotes: 2

Related Questions