Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 7th, 2006, 04:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Download documents from private folder, how?

Hey there.

Hope you can help me with this problem. I have several PDF files which should be downloadable through my web site, but only to a small group of people, which are logged on. The simple way to download these files would be to add a link directly to these, but this would be no good, if the files were in a private folder, and then it doesn't fulfill my requirements!

There are probably loads of components which enable downloads from private folders, but I am interested in the best freeware component for the job. Do you have any experience with this?

Actually, the best solution would be if I could code it my self, but how? Need inspiration.

Thanks, Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
 
Old October 11th, 2006, 02:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, now I finally figured it out... These few lines do the trick...
Code:
Response.AppendHeader("Content-Disposition","attachment; filename=" + fileNameWhichTheFileWillBeDownloadedTo); 
Response.WriteFile(pathToFileToDownload); 
Response.Flush();
Thanks anyway, Jacob.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help!!!!!Private Sub Worksheet_Change VicM Excel VBA 1 March 6th, 2008 10:35 PM
Private Messages ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 10 October 22nd, 2007 03:48 PM
App_Code folder shared on only 1 folder? rpeters83 ASP.NET 2.0 Professional 1 September 1st, 2006 10:53 PM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 05:57 AM
Using Private Sub cutovoi Excel VBA 0 February 5th, 2004 12:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.