如何显示pdf文件而不在asp.net中使用iframe [英] How To Display the pdf file Without using iframe in asp .net

查看:99
本文介绍了如何显示pdf文件而不在asp.net中使用iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请给出解决方案如何在不使用asp .net中的iframe的情况下显示pdf文件,或者提供一个解决方案,以便在asp .net中显示查看器.js



谢谢 .. 。 。

Please Give the solution how to display the pdf file without using iframes in asp .net or give a solution for displaying with viewer .js in asp .net

Thank You .. . .

推荐答案

您可以使用以下两个选项中的任何一个:



1.使用<对象> < / object> TAG

2.

You can use any one out of these 2 options:

1. Use <object> </object>TAG
2.
Response.Clear();

string filePath = Your file path on the server 

Response.contentType = "application/pdf";

Response.WriteFile(filePath);


这篇关于如何显示pdf文件而不在asp.net中使用iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆