Dynamically change key value in web.config
Suppose there is a key present in web config and which have the value 10.
<add key="Unit" value="10" />
You can modify the value programmatically using this code
Configuration webConfigApp = WebConfigurationManager.OpenWebConfiguration("~");
webConfigApp.AppSettings.Settings["Unit"].Value = "15";
I would recommend XML Webpad - http://xmlwebpad.codeplex.com/
It's a framework to view an edit XML files. Once you integrate it with your web app, editing web.config will be as simple as viewing the web.config page, making the required changes and hitting the save button (all from within your application). And bets part all the editing features comes out-of-box and you don't have to write any code for that.
Why Should we use that framework while we have facility to change it through writing code? Can you explain?
I believe the idea of using a framework is to let you write as less code as possible (i.e. not re-invent the wheel by starting from scratch) but still give the flexibility of extending/changing it with your own code per your requirement.
I believe this code is not huge..It's one line of code and programmer don't change value frequently in webconfig.I believe it's not good idea to use a framework instead of writing one line of code.