Friday, December 3, 2010

For to Download a file

        Response.Clear();
        string archiveName = String.Format("xml-{0}.zip", ".zip");
        Response.ContentType = "application/zip";
        Response.AddHeader("content-disposition", "filename=MyZipFile" + archiveName);
        Response.TransmitFile(Server.MapPath("~\\zipfolder\\MyZipFile.zip"));
        Response.End();

No comments:

Post a Comment