473,395 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Deleting file after Response.WriteFile(filepath) download

I have written a web form which downloads files to the
client automatically. After the download completes, I
would like to delete the file that was downloaded. I
can't tell how to wait until the download has completed to
delete the file, if I run the File.Delete(filepath)
command after Response.WriteFile(filepath), the file is
deleted before it can be downloaded.

Any suggestions?

Thanks,

Todd

Jul 19 '05 #1
0 2728

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
4
by: MW de Jager | last post by:
Hi I want to make a download link on my ASP page, however if I use a Hyperlink, this just tries to open the file in the browser and does nothing if the file is of an unknown type. If I right...
0
by: Todd Richardson | last post by:
I have written a web form which downloads files to the client automatically. After the download completes, I would like to delete the file that was downloaded. I can't tell how to wait until the...
2
by: Tim | last post by:
I have developed a web based file manager application. It has a simple interface that allows users to upload and download files. Everything works great except for one new download problem. I am...
1
by: Cindy H | last post by:
Hi I used the code below to automatically open a pdf file when the user clicks on a menu option. It works great on local machine, but when I uploaded it to hosting site and then tried it, I...
2
by: jwf | last post by:
I am developming a web application in ASP.NET (VB) and am looking to develop functionality where a user clicks on a link to download a file but at no point can the user see the actual URL link to...
4
by: L. Scott M. | last post by:
I am invoking a file download using the following code: Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + downloadFile.Name);...
3
by: tshad | last post by:
I have a function that downloads a file to the users computer and it works fine. The problem is that I then want the program to rename the file (file.move) to the same name plus todays date. ...
0
by: bill | last post by:
Hi All, I have built an application that allows a user to download a file from the server. I would like to come up with a solution that works with all html standard compliant browsers in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.