Author: Golds | Posted on: 12/2/2009 5:20:34 AM | Views : 405

I was uploaded the file using fileupload control and save it in server using

Server.MapPath("~/uploadedFiles/") + FileUpload1.FileName

Now i need to delete/remove that file.

I am using

System.IO.File.Delete(Server.MapPath("~/uploadedFiles/") + FileUpload1.FileName)

 but it shows error

The process cannot access the file 'C:\website\uploadedFiles\file.html' because it is being used by another process.

How to delete that file?.
...

Go to the complete details ...