tips & tricks


Calendario
febbraio 2025
lmmgvsd
272829303112
3456789
10111213141516
17181920212223
242526272812
3456789

Download file from Aspx page

   Download file from Aspx page


    protected void Download(byte[] zipBytes)
    {
        System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
        string fileName = "tracciati.zip";
        response.ContentType = "binary/octet-stream";
        response.AddHeader("Content-Type", "binary/octet-stream");
        response.AddHeader("Content-Disposition", "attachment;filename=" + fileName + "; size=" + zipBytes.Length);
        response.Flush();
        response.BinaryWrite(zipBytes);
        response.Flush();
        response.End();
    }
Categoria: ASP.NET
martedì, 02 gen 2018 Ore. 12.46
Archivio Posts
Anno 2020

Anno 2018

Anno 2015

Anno 2013

Anno 2011

Anno 2010

Anno 2009

Anno 2008
Statistiche
  • Views Home Page: 15.301
  • Views Posts: 58.675
  • Views Gallerie: 2.837
  • n° Posts: 117
  • n° Commenti: 1
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003