title: How to create download file and refresh the page
body: <p>I had create a download button, it will zip the files from my folder then it will return the zip file to user. I had no way to refresh my page after return the zip file. </p>
  
  <p>Here was my code like this :</p>
  
  <pre><code>&lt;div runat="server" id="divDownload"&gt;
      &lt;table width="100%" class="border" cellpadding="2" cellspacing="1"&gt;
          &lt;tr&gt;
              &lt;th colspan="5" align="left"&gt;Download&lt;/th&gt;
          &lt;/tr&gt;          
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;asp:Button runat="server" ID="btnDownloadAll" Text="Download All Converted" OnClick="btnDownloadAll_Click" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>code behind</p>
  
  <pre><code>protected void btnDownloadAll_Click(object sender, EventArgs e)
  {
      // Here we will create zip file &amp; download
      Response.ContentType = "application/zip";
      Response.AddHeader("content-disposition", "fileName=test.zip");
      byte[] buffer = new byte[4096];
      ZipOutputStream zipOutputStream = new ZipOutputStream(Response.OutputStream);
      zipOutputStream.SetLevel(3);
      try
      {
          DirectoryInfo DI = new DirectoryInfo(Server.MapPath("~/myFolder/"));
          foreach (var i in DI.GetFiles())
          {
              Stream fs = File.OpenRead(i.FullName);
              ZipEntry zipEntry = new ZipEntry(ZipEntry.CleanName(i.Name));
              zipEntry.Size = fs.Length;
              zipOutputStream.PutNextEntry(zipEntry);
              int count = fs.Read(buffer, 0, buffer.Length);
              while (count &gt; 0)
              {
                  zipOutputStream.Write(buffer, 0, count);
                  count = fs.Read(buffer, 0, buffer.Length);
                  if (!Response.IsClientConnected)
                  {
                      break;
                  }
                  Response.Flush();
              }
              fs.Close();
          }
          zipOutputStream.Close();
          Response.Flush();
          Response.End();
      }
      catch (Exception ex)
      {
          throw ex;
      }
  }
  </code></pre>
  
  <p>How can I do things like return the zip to user, also i refresh my page for showing the uploadlog that I updated in database?</p>