D
daiski
Hi,
I have uploaded an image to the web server using the code below. Note
that 'FileUpload' is the name of my HTML input control.
if (FileUpload.PostedFile != null)
{
String virtualPath = "~/uploads/" + Path.GetFileName
(FileUpload.PostedFile.FileName);
String phyiscalPath = Server.MapPath(virtualPath);
FileUpload.PostedFile.SaveAs(phyiscalPath);
}
I save the physicalPath and virtualPath in SQL DB for image retrieval.
QUESTION: How can I delete the image 'physically' from the web server
if I dont need it any more??
I have uploaded an image to the web server using the code below. Note
that 'FileUpload' is the name of my HTML input control.
if (FileUpload.PostedFile != null)
{
String virtualPath = "~/uploads/" + Path.GetFileName
(FileUpload.PostedFile.FileName);
String phyiscalPath = Server.MapPath(virtualPath);
FileUpload.PostedFile.SaveAs(phyiscalPath);
}
I save the physicalPath and virtualPath in SQL DB for image retrieval.
QUESTION: How can I delete the image 'physically' from the web server
if I dont need it any more??