views:

919

answers:

1

Hi,

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...

+2  A: 

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.