title: return a downloadable zip file using $.post or $.get
body: <p>I'm making a zip file and i want to return a downloadable file but I cant figure out the return file part even tho i tried some examples i found online.</p>
  
  <p>this is the code i use for this now, it does work without the <code>$.post()</code> but i need it to work with jquery. all ideas are welcome</p>
  
  <pre><code>$('.zipFiles').live('click', function () {
              $.post('/Home/ZipFiles');
  });
  
  
  //return a file
  public FileResult ZipFiles()
      {
          var filesToZip = Session["DownloadQue"] as List&lt;string&gt;;
          var savedZipFile = Server.MapPath("~/App_Data/") + DateTime.Now.Minute + ".zip";
  
          if (filesToZip != null &amp;&amp; filesToZip.Count &gt; 0)
              using (var zip = new ZipFile(savedZipFile))
              {                    
                  foreach (string item in filesToZip)
                  {
                      var path = Server.MapPath(Path.Combine("~/Pics/", item));
                      zip.AddFile(path, @"\cf");
                  }
  
                  zip.Comment = "this was made online";                    
                  zip.Save();
              }
  
          return File(savedZipFile, System.Net.Mime.MediaTypeNames.Application.Zip);
      }
  </code></pre>