Posted on: 3/9/2015 4:53:21 PM | Views : 638

Hello, i created one folder under solution explorer called subimg (subimg is not under any folder. it is under solution explorer).
In my project i need show different images for the product. so,i need to save and delete images from folder .
Below code works exctaly what i want when i am running in localhost.
But after hosting in IIS Server, it is not working.
to save image into folder showimage.ashx.cs ***************** string path23 = context.Server.MapPath("~/subimg"); bmpToSave1.Save("" + path23 + "/"+ ".jpg");
to delete image from folder product.aspx.cs(pageload) ************************ try { var fileimgpath = Directory.GetFiles(Server.MapPath("~/subimg"));
foreach (string s1 in fileimgpath) { if (File.Exists(s1)) { File.Delete(s1); } } } catch(Exception ex) {
} ...

Go to the complete details ...