Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 January 18th, 2005, 09:20 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple file download

I have a datagrid, which displays

[CheckBox] -- File Name of Docs -- Location -- LastModified
[CheckBox] -- File Name of Docs -- Location -- LastModified
[CheckBox] -- File Name of Docs -- Location -- LastModified
[Button - Down Load Selected Documents]

Something like the above, the user can select may be one or more documents, by checking the check box and click the button "Download the selected documents".

I have tried looping into the Datagrid for the checked documents. And tried passing the filename to a function DonwloadFile function.

private void DownloadFile(FileInfo file)
{
Response.Clear();
Response.AppendHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.ContentType ="application/octet-stream";
Response.WriteFile(file.FullName);
}

The code download only one document and stops, can any one help me solving this. I want all the selected files to be downloaded to the some where in my local drive.











Similar Threads
Thread Thread Starter Forum Replies Last Post
File Download. rupen ASP.NET 1.x and 2.0 Application Design 4 February 23rd, 2008 08:43 AM
Download File Muhammad Zeeshan ASP.NET 2.0 Professional 0 October 24th, 2007 12:51 AM
Smaller download/single download file available jminatel BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 November 21st, 2005 11:10 AM
Multiple file download Simultaneously goodybuddy General .NET 1 January 24th, 2005 10:17 AM
Simultaneous multiple file download balamuralivenkat Classic ASP Basics 6 December 17th, 2003 11:37 PM





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