讀取配置文件並修改

1. 讀取某個文件夾下的Web.config中的appSection的節點,並修改保存
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/rmsms");
            AppSettingsSection appSection = (AppSettingsSection)config.GetSection("appSettings");
            appSection.Settings["FCKeditor:UserFilesPath"].Value = "D:";
            config.Save(ConfigurationSaveMode.Modified);  


發佈了34 篇原創文章 · 獲贊 1 · 訪問量 15萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章