I have situation like this, a file is made on server, then the clinet is
downloading it to his machine and afterwards i wish to delete file on
the server, unfortunately if i'm doing it like that, it doesn't work:
Response.AppendHeader("content-disposition","attachment;
filename="+txtFileName.Text);
Response.ContentType = "application/x-msdownload";
Response.WriteFile((string)ViewState["backupFile"]);
File.Delete((string)ViewState["backupFile"]);
- the file is deleted before this dialog launches, if i ommit the last
line dialog is shown, client saves the file, and it's fine.
How to force my app to wait before user saves the file and right then
when it's done - delete the file on server?
Thx