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
Post a Comment