Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

How to get the download completed status?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Santel - 18 Apr 2008 05:43 GMT
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 - 18 Apr 2008 08:35 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> file from server. Is it possible to capture the download completion
> stage? Anyone please suggest!

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 - 18 Apr 2008 13:59 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.