asp.net - how to delete image file after upload in C#? -


i have problem on deleting or moving files after upload in asp.net.

i using radupload uploading files , want have remove button delete physical file.

however, right after successful upload can't delete physical file , error raised "file in use".

you should delete self writing code, , think should upload code too. anyway here sample code delete file.

 fileinfo info1 = new fileinfo(folderpath + filename);             if (info1.exists)             {                 info1.delete();             } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -