Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get the download completed status?

0 views
Skip to first unread message

Santel

unread,
Apr 18, 2008, 12:43:21 AM4/18/08
to
Hi,

To provide download functionality, I used the below code.

Response.ContentType = "application/x-download";
string strFileName=@"d:\Landscape.jpg";
Response.AddHeader("Content-Disposition", "attachment;
filename=testing.jpeg" );
Response.WriteFile(strFileName);
Response.End();

Once the file is downloaded completely, I would like to delete that
file from server. Is it possible to capture the download completion
stage? Anyone please suggest!

Stan

unread,
Apr 18, 2008, 3:35:41 AM4/18/08
to

You can't do it with server-side code only. You need to include some
java-script embedded in the .aspx page that will make the browser save
the file locally and then issue a post-back event which will be
detected on the server.

HTH

Santel

unread,
Apr 18, 2008, 8:59:35 AM4/18/08
to
Thanks for the update. I don't find any option to capture the status
in javascript too. Can you please suggest me to start with?

0 new messages