Read and Write to configuration's files

Reading:
string value = ConfigurationManager.AppSettings["Setting1"];

Writing:
System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["Setting1"].Value = "3";
config.AppSettings.Settings["Setting2"].Value = "blabla";
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");

When use configuration settings in your web.config you have tou use
WebConfigurationManager class.

Postback in ASP.NET

This post is a short explanation of the postback "magic" used in asp.net. Check this out.
If you have to change data in a popup and also this information have to be changed in the parent page you can use window.openere.document.__doPostBack('',''); to do postback on the parent page and refresh the information there. The event target id can be passed by session variable or page parameter to the popup. The actual actions in the popup are these:

window.close();
var theform = window.opener.document.aspnetForm;
theform.__EVENTTARGET.value = id
theform.__EVENTARGUMENT.value = '';
theform.submit();