Cookies

This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.

Using csFileDownload to control downloads with ASP

This page shows how csFileDownload can be used to control downloads. There are a number of files of different types in a directory that is not web shared. Following a link, or clicking a button will run the download script and stream the file to the browser.

There is only one script that controls the downloads. The links pass the file details in the URL, and the buttons pass the file details as form variables.

The download links are split into two columns. The ones on the left specify that the file should be displayed "inline". On the right the file is indicated as an attachment.

This demo was originally put together when the two main browsers were Microsoft Internet Explorer and Netscape and and there were quite significant differences in behaviour between the two. It can still be useful to see the difference between using the attachment directive compared with inline, and to compare the difference between a form button and linking to the download script.

Inline Attachment
Zip File Zip File
PDF File PDF File
Gif Image Gif Image
Jpeg Image Jpeg Image
Html file Html file
Word document Word document
Text document Text document

View the listing and description of "download.asp".

Cookies

This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.