Posted on: 8/27/2013 4:54:38 AM | Views : 755

Hello, I'm attempting to save a image to my ~/images directory then update a web.config appsettings value with the file name of the image. With my code below the file is uploaded to the correct images folder but it is not added to the solutions files. Secondly, the value in appsettings does not change. What am I doing wrong here:
protected void lbLogoSubmit_Click(object sender, EventArgs e) { if (fuLogo.HasFile) { lblSiteLogo.Text =Path.GetFileName(fuLogo.FileName); ConfigurationManager.AppSettings["Logo"] = lblSiteLogo.Text; ConfigurationManager.RefreshSection("appSettings"); fuLogo.SaveAs(Server.MapPath("~/Images/") + lblSiteLogo.Text); Response.Redirect("AppSettings.aspx", false); } else { ConfigurationManager.AppSettings["Logo"] = & ...

Go to the complete details ...