473,386 Members | 1,745 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,386 software developers and data experts.

How to know when download File was cancelled?

Hi there

I want to record in a Db when a file is download via my website. These
are actual download links not someone flogging my sites images. I have
an ahref pointing to my apsx page containing the file to download.

Im using

Response.AppendHeader("Content-Disposition", "attachment; filename=" &
_filename)

so the user gets a dialog box im sure you're all familiar with... My
question is how do i know when the user cancells the download so i can
determine whether to update my Db?

TIA

Henry
Nov 17 '05 #1
2 2128
Hi,

If you will implement HTTP handler for the download files types you can
have full control if someone download them.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Assuming you're streaming out the file, you need to check every so often to
make sure Response.IsClientConnected. If the user bails out of the download
for some reason then this will return false before you finish sending your
full page (which is actually file.)
Here's more info:
http://msdn.microsoft.com/library/de...ectedtopic.asp

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net

"Admin" <in**********@hotmail.com> wrote in message
news:37*************************@posting.google.co m...
Hi there

I want to record in a Db when a file is download via my website. These
are actual download links not someone flogging my sites images. I have
an ahref pointing to my apsx page containing the file to download.

Im using

Response.AppendHeader("Content-Disposition", "attachment; filename=" &
_filename)

so the user gets a dialog box im sure you're all familiar with... My
question is how do i know when the user cancells the download so i can
determine whether to update my Db?

TIA

Henry

Nov 17 '05 #3

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

Similar topics

3
by: Jim J | last post by:
I have been trying to find some kind of authentication method or script (PHP/perl/javascript or other) to achieve the following, with no luck. Say there are 100 files at a site. A person can...
17
by: MyndPhlyp | last post by:
I've been trying to Google this but have been getting far too many hits to be of use. Is there a slick way to generate a CSV or other Excel-friendly format and push it to the client? I'm using...
2
by: Edward | last post by:
For reporting purposes I use Crystal Reports. The user can select a printer from a dropdownlist. I set the printer with: PrintOptions.PrinterName = @"\\SERVERNAME\" +...
4
by: VBTricks.de.vu Webmaster | last post by:
Hello, at the moment I'm not able to finish my program. That means, I have a problem I can't solve myself. Therefore I'm asking those who already worked with HttpWebRequest... and threads. ...
0
by: NutsAboutVB | last post by:
Basically, the title explains it. I want to be able to read the first n bytes (say, 1024 bytes) of any file (text or binary) off the internet in my vb.net application. I specifically do not want...
2
by: Steve | last post by:
After running into a design wall with my traditional thread approach, I realized that a BackgroundWorker object would fit my needs pretty good. Never really used them before. In a nutshell, my...
2
by: Dan D | last post by:
I have a large install file (an exe) on my web server that people download and install from. Looking at my log files, I see a lot of people downloading it, but no way to tell for sure if they...
5
by: Dan D | last post by:
I have a large install file (an exe) on my web Apache server that people download and install from. Looking at my log files, I see a lot of people downloading it, but no way to tell for sure if...
8
by: cgd | last post by:
windows2003+sp2 i use the ie7 download a file, i want to know where is the temp fold? thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.