如何通过我的Web应用程序中的超链接从D驱动器或Server的其他驱动器打开文件. [英] How to open a file from D drive or other drive of Server through hyperlink in my web apps.

查看:63
本文介绍了如何通过我的Web应用程序中的超链接从D驱动器或Server的其他驱动器打开文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用C#.NET在我的ASP.NET页面上提供D驱动器或服务器其他驱动器文件的链接.因此,每当我单击该链接时,它都应在客户端计算机上的相应应用程序软件中打开.

假设应该在MS WORD应用程序中打开MS Document File.

请帮助...........:doh:

I want to provide links to the files of D Drive or other Drive of Server on my ASP.NET page using C#.NET. So, whenever I click that link it should open in respective application software on client machine.

Suppose MS Document File should open in MS WORD application.

Please Help........... :doh:

推荐答案

确保文档所在的文件夹对您的帐户具有读权限. IIS运行,以便应用程序可以直接读取.之后,它应该自动允许您链接到那些文件.

要在适当的应用程序中打开文档,这与客户端计算机(而不是服务器)有关.如果用户已设置其操作系统以Word形式打开Word文档,则它应该可以正常工作,但是在这方面您将无法控制客户端计算机.
Make sure the folder where the documents reside have read permission to the account under which your IIS runs so that the application can read the directly. After that, it should automagically allow you to link to those files.

To open documents in the appropriate application, that will have to do with the client machine, not your server. If the user has set up his OS to open a word document in word, then it should work fine, but you will have no control over the client machine in this respect.


Process.Start (文件名路径");

对于单词尝试Process.Start("winword.exe");
Process.Start("Filenamepath");

for word try Process.Start("winword.exe");


这篇关于如何通过我的Web应用程序中的超链接从D驱动器或Server的其他驱动器打开文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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