Solved

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

Posted on 2010-09-16
4
542 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
  • 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now