1,修改web.config
2,修改app.config
Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
config.AppSettings.Settings["a1"].Value = "new value";
config.Save(ConfigurationSaveMode.Modified);
2,修改app.config
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["a1"].Value = "new value";
config.Save(ConfigurationSaveMode.Modified);
没有评论:
发表评论