473,386 Members | 1,828 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 setup a download page

I want to setup a downloads page on my site. Most of the time they are zip
files but they are also MSI files. Things work ok if I simply put an <a>
element referencing the file to download but I'd like a little more smarts
to it. I'd like to know how many times the file was downloaded along with
the referrer information. I'd also like to hide the actual physical file
location.

So I send it to another URL to record the download but then how do I
initiate the download (from a push point of view).

thanks.
Nov 19 '05 #1
3 1313
Try writing a custom HttpHandler. The parameters will usually be passed via
query strings. The custom handler then generates the appropriate ContentType
for the output, and generates the output data (eg. by reading the
appropriate file).

I am using this technique not for a file download but for a similar
purpose - a report generator page that contructs a report based on
parameters supplied to it, then supplies the report back as either HTML
output or PDF output.

You can also "get away with" using a standard ASP.NET form and using
Response.Write/Response.WriteFile and Response.End, but it is not a clean
solution.

"Jeff Jarrell" <jj************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I want to setup a downloads page on my site. Most of the time they are zip
files but they are also MSI files. Things work ok if I simply put an <a>
element referencing the file to download but I'd like a little more smarts
to it. I'd like to know how many times the file was downloaded along with
the referrer information. I'd also like to hide the actual physical file
location.

So I send it to another URL to record the download but then how do I
initiate the download (from a push point of view).

thanks.

Nov 19 '05 #2
I'd suggest creating a download page that manages such files. It might use
Response.WriteFile for example:

Response.Clear()
Response.ContentType = Whatever
Response.Writefile("c:\whatever.zip")
Response.AddHeader("Content-Disposition", _
"attachment;filename=whatever.zip")
Response.End()

Or you might choose to store your files in SQL Server, such as in this
example that explains all about uploading and downloading files:
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jeff Jarrell" <jj************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I want to setup a downloads page on my site. Most of the time they are zip
files but they are also MSI files. Things work ok if I simply put an <a>
element referencing the file to download but I'd like a little more smarts
to it. I'd like to know how many times the file was downloaded along with
the referrer information. I'd also like to hide the actual physical file
location.

So I send it to another URL to record the download but then how do I
initiate the download (from a push point of view).

thanks.

Nov 19 '05 #3
excellent. thanks.

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:u5**************@TK2MSFTNGP10.phx.gbl...
I'd suggest creating a download page that manages such files. It might
use Response.WriteFile for example:

Response.Clear()
Response.ContentType = Whatever
Response.Writefile("c:\whatever.zip")
Response.AddHeader("Content-Disposition", _
"attachment;filename=whatever.zip")
Response.End()

Or you might choose to store your files in SQL Server, such as in this
example that explains all about uploading and downloading files:
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jeff Jarrell" <jj************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I want to setup a downloads page on my site. Most of the time they are zip
files but they are also MSI files. Things work ok if I simply put an <a>
element referencing the file to download but I'd like a little more smarts
to it. I'd like to know how many times the file was downloaded along with
the referrer information. I'd also like to hide the actual physical file
location.

So I send it to another URL to record the download but then how do I
initiate the download (from a push point of view).

thanks.


Nov 19 '05 #4

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

Similar topics

0
by: Mads | last post by:
Hi we see some strange behavior with the latest version of our deployment package Background We have a .Net product that is deployed via a website. Developed with VS.Net 2003, the deployment...
4
by: pbj | last post by:
my application was created in vb.net, vs 2003. the setup project was also created in vs 2003. one of my application reviewers reported this: The .Net link that is included in the setup is not the...
0
by: Soren Jorgensen | last post by:
Hi, Is it possible to, at runtime from a dll or exe, to start a new build of a setup program solution?? We are working on a download page for our online users and to make it as easy for the...
0
by: Abhishek | last post by:
Hi! everyone How do i create an intelligent setup? I have to install directx as well as .net framework on the client systems for my product to run properly. If i include these 2 in my setup my...
3
by: LeAnne | last post by:
where can i download the setup for vb.net 2005 express edition. the link on MS site allows me to download only a file which when run will install it onto my computer. What i need is the whole...
1
by: sudhaoncyberworld | last post by:
Hi all I am using VS2005, How can I deploy the .Net Framework from my setup project? In the bootstrapper setup program we have below 3 options 1.Download prerequisites from the component...
0
by: Achim Domma | last post by:
Hi, I try to develop a localized Asp.Net 1.1 application. I have added two resource files to my app, which are called 'Labels.resx' and 'Labels.de.resx'. If I compile the app, I see a 'de'...
7
numberwhun
by: numberwhun | last post by:
**NOTE: This article is written using the 5.8.8 Alpha2 release of Strawberry Perl. I am writing this article with much joy and glee. This is due to the fact that Active State no longer has a...
0
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. ...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.