使用vb(ASP.NET 2.0)将PDF文件显示为Webform [英] Display PDF File into webform using vb (ASP.NET 2.0)
问题描述
我一直在尝试这段代码,以将PDF文件显示到我的网络表单中.我只想显示它,而不下载它.:
I have been trying this piece of code to display the PDF file into my webform. I just want to display it, not download it.:
<iframe src="<a href="../DownloadForm/Form1.pdf</a>" style="z-index: 100; left: 27px; width: 671px; position: absolute; top: 130px; height: 502px"></iframe>
发生错误请求"错误.这是什么意思?我应该在哪里编辑代码?请指导我..
Error of ''Bad request'' occured. What does it mean? Where should I edit the code? Please guide me..
推荐答案
此HTML代码格式不正确,您看不到吗?
可能是您的意思
This HTML code is not well-formed, don''t you see it?
Probably you mean
<iframe src="../DownloadForm/Form1.pdf"
style="z-index: 100; left: 27px; width: 671px; position: absolute; top: 130px; height: 502px" />
属性值中没有HTML之类的东西.
让我告诉你,绝对定位的iframe
看起来很丑.我希望您仅将内联样式用于代码示例-它应位于单独的样式表,单独的文件集中或至少在<head>
标记中.
There is no such thing as HTML inside attribute value.
Let me tell you that your iframe
with absolute positioning looks ugly. I hope you use inline style only for the code sample — it should be in separate style sheet, separate set of files or at least in the <head>
tag.
这篇关于使用vb(ASP.NET 2.0)将PDF文件显示为Webform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!