us******@gmail.com wrote:
Hi all,
I want to track how many times visitor download file from my website,
for example, when visitor click on a download link, a ASPX page will be
requested, after that it will redirect to a file stored on my web site,
final visitor will see open/save file dialog,
how to do that, or is there an example code do this work?
thank you,
Um, you kind of gave one answer yourself, didn't you? I mean you can
create a 'middle' page, an aspx that logs a 'hit' somewhere like a
database; the logging of the count is dependent on where you want it to
be stored, just remember to keep it thread-safe (simultaneous updates).
Or, you could put the files in a directory hidden to the outside world,
and have the aspx download the file 'manually'. An example of
downloading the file is shown here:
http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET