How to edit Configuration file Web.Config
in web.config we use <appSettings> section to add keys as you see
<appSettings>
<add key="email" value="" />
<add key="color" value="green" />
</appSettings>
in code behind write this code to enable us reach to Keys and get value
Configuration conf = WebConfigurationManager.OpenWebConfiguration("~");
AppSettingsSection app = (AppSettingsSection)conf.GetSection("appSettings");
app.Settings["email"].Value = TextBox1.Text;
app.Settings.Add("color", "green");
conf.Save();
hope this useful