Hi guys..
Below is my code to upload an image file.. resize and save it to another name.. and then delete an original image file.
Everything is fine but error returned when i trying to remove original image file.
The process cannot access the file because it is being used by another process
Pls advise. TQ
If (Me.FileUpload.HasFile) = True Then
'start image resize and save
Try
Dim OriginalImage As System.Drawing.Image
Dim ResizedImage As System.Drawing.Image
Dim w, h As Integer
If FileUpload.FileName <> "" Then
FileUpload.PostedFile.SaveAs(path + filename_temp)
'Resiging Small Image
OriginalImage = System.Drawing.Image.FromFile(path & filename_temp)
w = OriginalImage.Width
...
Go to the complete details ...