我的项目有问题吗? [英] i have a problem in my project?

查看:93
本文介绍了我的项目有问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其中包含一个带有pdf文件的文件夹,word files.my要求我需要在网页中显示这些文件。

我正在使用此代码

 <   a    < span class =code-attribute> href   = 〜/ foldername / filename >  <   / a  >  



但是在这种情况下它不会被带到网址。

和if我接受

 <   a  < span class =code-attribute>   href   =  filename.docx >  


它下载文件但它没有显示在同一个网页上。

解决方案

请通过如何使用ASP.NET和Visual C#.NET将二进制文件写入浏览器 [ ^ ]。



支持 PDF Word Excel 以及各种图像文件格式。


< blockquote>你需要使用一些activex编程来在你的网页上显示pdf文件。

像谷歌浏览器这样的浏览器有内置的文档查看器...也许,这就是你的意思......

i have a project that contains one folder with pdf files,word files.my requirement is that i need to display that files in webpage.
for that i am using this code

<a href="~/foldername/filename"></a>


but in this case it is not taken the url.
and if i take

<a href="filename.docx">


it downloads the files but it's not displaying in the same web page.

解决方案

Please go through How To Write Binary Files to the Browser Using ASP.NET and Visual C# .NET[^].

It supports PDF, Word, Excel and a variety of image file formats.


You need to use some activex programming to display the pdf file on your webpage.
Some browsers like Google chrome has inbuilt document viewer... Maybe, that's what you meant...


这篇关于我的项目有问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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