Thursday, 24 November 2011

how to get download dialog box for pdf file while using asp.net


        string filepath = "print.pdf";
        string filename = "ranga.pdf";
        Response.ContentType = "pdf";
        Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename);
        Response.TransmitFile(filepath);
        Response.End();

No comments:

Post a Comment

Please Give Your Valuable Comments on this Topic