从服务器打开文件嵌入asp页面 [英] Open file from server to embed in asp page

查看:86
本文介绍了从服务器打开文件嵌入asp页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这条线有什么问题



What is wrong with this line

<embed id="srcfile" src="PDF/Manual.pdf" width="980" height="1000" type='application/pdf' runat="server"></embed>





我有一个aspx页面,我在上面的行几乎只是打开PDF



我尝试过:



之前,我在项目文件中有我的文件。现在他们被转移到服务器。我无法从服务器打开文件。



I have an aspx page where I have above line which pretty much just opens the PDF

What I have tried:

Earlier, I had my files on the project files. Now they are moved to server. And I cannot get the file open from server.

推荐答案

首先,在文件后有5个斜杠:协议。你需要2个斜杠作为UNC路径。

First, you have 5 slashes after the file: protocol. You need 2 slashes for a UNC path.
<embed id="srcfile" src="file://isc-vmfs01/ClaimsFiles/PDF/User_Manual.pdf" wid...



如果客户端的用户没有对该文件共享及其下的文件夹路径的读取权限,那么他们将无法使用下载文件。浏览器中的HTML代码以用户身份运行,而不是服务器。





***此答案可能不再是有效的,因为原始问题现在已被编辑,以显示完全不同的东西***


既然你已经改变了问题,你真的需要解释你的问题干嘛您所做的只是询问某一行HTML是什么问题。这并没有解释你最终试图通过这个代码实现什么。



一个合适的解决方案是包含一个控制器来处理文件下载,比如PDF文件,无需指定< embed> 标记。
Now that you've changed the question, you really need to explain what you're doing. All you're doing is asking what's wrong with a certain line of HTML. This does not explain what you're ultimately trying to achieve with this code.

An appropriate solution would be to include a controller for handling file downloads, like PDF files, without having to specify <embed> tags.


这篇关于从服务器打开文件嵌入asp页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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