读取:
var imgSizeStr = ConfigurationManager.AppSettings["UploadImgSize"];
写入:
Configuration config = WebConfigurationManager.OpenWebConfiguration("/");
AppSettingsSection app = config.AppSettings;
app.Settings["UploadImgSize"].Value = value.ToString();
config.Save(ConfigurationSaveMode.Modified);
浙公网安备 33010602011771号