Saturday, 26 March 2011

Opening a PDF File in Page from Asp.net page



private void ReadPdfFile()
    {
        Response.Clear();               Response.AddHeader("Content-Disposition", "inline;
        filename=document.pdf");
        Response.ContentType ="application/pdf";
        Response.TransmitFile(@"C:\FirstPost.pdf");
        Response.Flush();
        Response.End();
        return;
    }



 

No comments:

Post a Comment