通过asp.net打开word文档 [英] open a word document by asp.net

查看:83
本文介绍了通过asp.net打开word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi。

如何在winword中打开word文档,以及当用户自动关闭文档时保存在服务器上?通过asp.net c#

hi.
How to open a word document in winword and when the user closes the document save on server automatically? by asp.net c#

推荐答案

你不能。

C#代码在服务器而不是客户端执行,所以所有的调用Process.Start导致应用程序在服务器上运行 - 客户端无法看到它,更不用说进行更改了。



除了非常非常具体的情况您不能导致任何应用程序(已安装或未安装)从服务器在客户端计算机上运行(这些情况不适用于99.99%的安装,因为它们需要启用IE和ActiveX)



想一想:客户端可能在PC,MAC,Android手机甚至是支持互联网的冰箱上。即使您可以在客户端上执行Word,也无法保证它已安装,或者甚至可以在该操作系统下的该处理器上运行。
You can't.
C# code is executed at the server, not the client, so all calls to Process.Start cause the application to run on the server - where the client can't see it, much less make changes.

Except in very, very specific circumstances you cannot cause any application (installed or not) to run on the client machine from the server (and those circumstances do not apply in 99.99% of installations as they require IE and ActiveX enabled)

Think about it: the client could be on a PC, MAC, Android phone, or even an internet enabled fridge. Even if you could execute Word on the client, you have no guarantee that it is installed, or will even work on that processor under that operating system.


您可以将谷歌文档用于此目的。它会让你轻松打开任何格式



You can use google docs for this purpose. it will let you open any format easily

<iframe src="http://docs.google.com/viewer?url=www.xyz.com/abc.doc&embedded=true" width="600" height="780" style="border: none;"></iframe></iframe>





将其runat属性作为服务器,并为此提供一个id,之后您可以轻松地绑定它代码隐藏。



https://docs.google.com/a/ati-erp.com/viewer [ ^ ]


这篇关于通过asp.net打开word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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