asp.net App.config配置文件帮助类
/// <summary> /// 保存app.config设定 /// </summary> /// <param name="key"></param> /// <param name="value"></param> public static void SaveAppConfig(string key, string value) { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings[key].Value = value; config.Save(ConfigurationSaveMode.Modified); }