Solved

upload files will stored in server and name will be stored in database.

Posted on 2010-09-16
4
549 Views
Last Modified: 2013-11-15
I have to upload files in my web page and file names will stored in database, but my files will be stored in a folder. When they download files will be download in zip format, how  will I do that ? can any expert help me.
0
Comment
Question by:Tapan Pattanaik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Assisted Solution

by:antonybrahin
antonybrahin earned 100 total points
ID: 33698354
there is no libraries available in .net

u can use this. its third party and its free with source code.

http://www.icsharpcode.net/OpenSource/SharpZipLib/
0
 
LVL 21

Author Comment

by:Tapan Pattanaik
ID: 33698421
any other websites or links ?
0
 
LVL 8

Accepted Solution

by:
cubaman_24 earned 400 total points
ID: 33699782
Hello:
I found very much easier to use Ionic Zip library, also free and opensource.
http://dotnetzip.codeplex.com/

private void MyExtract()
  {
      string zipToUnpack = "C1P3SML.zip";
      string unpackDirectory = "Extracted Files";
      using (ZipFile zip1 = ZipFile.Read(zipToUnpack))
      {
          // here, we extract every entry, but we could extract conditionally
          // based on entry name, size, date, checkbox status, etc.  
          foreach (ZipEntry e in zip1)
          {
            e.Extract(unpackDirectory, ExtractExistingFileAction.OverwriteSilently);
          }
       }
    }

private void CreateZipFile(){
     using (ZipFile zip = new ZipFile())
  {
    zip.AddFile("ReadMe.txt");
    zip.AddFile("7440-N49th.png");
    zip.AddFile("2008_Annual_Report.pdf");        
    zip.Save("Archive.zip");
  }

}

Open in new window

0
 
LVL 21

Author Closing Comment

by:Tapan Pattanaik
ID: 33767909
Thanks to all
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question