设置背景图,可以读取,但是不知道怎么设置。
string background =System.Web.Configuration.WebConfigurationManager.AppSettings["BackgroundImage"]
在网上查询了之后发现可以这样修改:
System.Configuration.Configuration cfa = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
cfa.AppSettings.Settings["BackgroundImage"].Value = "../WorkFolder/Upload/Background/" + file.FileName;
cfa.Save();