Author: kamii47 | Posted on: 3/30/2010 1:18:59 PM | Views : 342

I am creating a zip file of some text file on the fly by the help of DB.
When user click a button the system query from DB, made the zip file and it will be downloaded.
Problem is that after the download i wanted to delete the file from the server.
But After Response.End() no further processing done and cursor is not coming to next line of code where this File.Delete line is calle.
Please help me in it.My current code is as below
private void DownloadZipFileDialogue(string strZipFilePath) { Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(strZipFilePath)); Response.TransmitFile(strZipFilePath); Response.End(); //File.Delete(strZipFilePath); }


...

Go to the complete details ...