使用asp.net中的数据库在asp.net页面路径上显示任何类型/ doc / pdf / txt / video文件 [英] show any type/doc/pdf/txt /video file on asp.net page path using database in asp.net

查看:66
本文介绍了使用asp.net中的数据库在asp.net页面路径上显示任何类型/ doc / pdf / txt / video文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在管理员上传的asp.net页面上显示doc / pdf / txt / ppt / xls文件

i为此使用iframe但未开始下载

喜欢请有人告诉我如何在asp.net页面上显示文档文件



< iframe src =  <%#Eval( path  )%> scrolling =   no  >  < /   iframe  >  





有人能告诉我一个使用c#

以及如何播放视频在asp.net中显示此类文件的想法......我正在尝试



< pre lang =c#>< iframe src = <%#Eval( videopath )%> scrolling = no > < / iframe >





但没有工作

解决方案

你不能只在客户端的浏览器窗口中显示任何类型的文件。

客户端的浏览器设置将定义如何打开附件并且您无法控制它。

默认情况下.doc和.docx将以Word,pdf打开使用阅读器(浏览器插件或独立)等...


使用超链接和_Target =空白重定向页面到超链接的路径点击使用导航网址...

i am trying to show the doc/pdf/txt/ppt/xls file on asp.net page that was uploaded by admin
i used iframe for this but not working its start downloading
like please someone tell me how to display a document file on asp.net page

<iframe src="<%#Eval("path")%>" scrolling="no"></iframe>



can someone tell me an idea to show such kind of file in asp.net using c#
and how to play video ...i am trying like

<iframe src="<%#Eval("videopath")%>" scrolling="no"></iframe>



but not working

解决方案

You can''t just show any kind of file in a browser window on the client.
The client''s browser setup will define how attachments are opened and you have no control over this.
By default .doc and .docx will open with Word, pdf with reader(either browser add-in or stand-alone), etc...


use hyperlink and _Target=blank redirect page to Your path on hyperlink click by using navigate url....


这篇关于使用asp.net中的数据库在asp.net页面路径上显示任何类型/ doc / pdf / txt / video文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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