在ASP.NET的网页打开PDF [英] Open PDF in web page of ASP.NET
本文介绍了在ASP.NET的网页打开PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想开在ASP.NET aspx页面的PDF。我不想导出PDF文件。
I want to open PDF in ASP.NET aspx page. I dont want to export a pdf file.
只需要编写ASPX页面相同的PDF文件作为我们正在写字节到图像控件。
Need just write pdf file in ASPX page same as we are writing bytes into Image control.
推荐答案
我得到的答案,这是太简单了。
I got the answer , it is too simple.
我已经在这里得到解答。
I have answered here.
Response.Clear();
string filePath = "myfile.pdf";
Response.contentType = "application/pdf";
Response.WriteFile(filePath);
Response.End();
这篇关于在ASP.NET的网页打开PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文