开发者

how to load PDF file in website page using C#

how to load PDF file in website page usin开发者_如何学Pythong C#


Here is how you send a file to the browser.

http://support.microsoft.com/kb/306654

private void Page_Load(object sender, System.EventArgs e)
    {
             //Set the appropriate ContentType.
        Response.ContentType = "Application/pdf";
             //Get the physical path to the file.
        string FilePath = MapPath("acrobat.pdf");
             //Write the file directly to the HTTP content output stream.
        Response.WriteFile(FilePath);
            Response.End();
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜