Friday, December 2, 2011

how to download a file

        Response.ContentType = "application/pdf";
        Response.AppendHeader("Content-Disposition", "attachment; filename=aaa-13.pdf");
        Response.TransmitFile(Server.MapPath("~/Image/UserDetails-13.pdf"));
        Response.End();

No comments:

Post a Comment