如何在asp.net中单击按钮时在Iframe中打开doc文件 [英] How to open a doc file in Iframe on button click in asp.net

查看:70
本文介绍了如何在asp.net中单击按钮时在Iframe中打开doc文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,







我想在asp中打开iframe中的doc文件。 net on button click。

解决方案

通过网页打开客户端计算机上的文件并不是那么简单......

1.客户必须有一个了解所请求格式的应用程序 - 在你的情况下一些办公室应用程序

2.要在浏览器中打开应用程序,你还必须有一些支持它的插件(并非所有应用程序都有它 - Microsoft Office没有!)

3.即使设置了1和2,用户也可以设置强制在浏览器外打开文档...



在任何情况下 - 您都可以创建一个iframe标记,其中source(src)属性指向服务器上的文档(或指向可以对其进行流式传输的页面) - 您可以阅读:使用简单网页流式传输您的文档 [ ^ ]

Dear All,



I want to open a doc file in iframe in asp.net on button click.

解决方案

Opening files on the client machine via web page is not so simple...
1. Client must have an application that understands the requested format - in your case some office application
2. To open application INSIDE the browser you also have to have some plugin that supports it (not all applications has it - Microsoft Office have no!)
3. Even 1 and 2 are set, user can have settings that force opening documents OUTSIDE the browser...

In any case - you can create an iframe tag, where the source (src) attribute points to the document on the server (or to a page that can stream it) - you may read this: Stream Your Documents Using Simple Web Page[^]


这篇关于如何在asp.net中单击按钮时在Iframe中打开doc文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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