下载后打开文件 [英] Open file after download

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

问题描述

一旦我下载了文件(exel,word,pdp,txt,rar ...),我想打开该文件进行预览。通过使用c#我该怎么办?请帮我!非常感谢你!

once i have dowloaded file(exel, word, pdp, txt, rar...) i would like open that file to preview it. by using c# how must i do? please help me! thank you so much!

推荐答案

使用 Process.Start方法 [ ^ ]:

Use the Process.Start Method[^]:
using System.Diagnostics; // add this at the top of your code file




Process.Start("yourfile.txt"); // change the file name and the extension into the file name and the extension that you need



希望这会有所帮助。


Hope this helps.


请参阅此链接: -

http://stackoverflow.com/questions/9647355/open-file-after-download-completed [ ^ ]
Refer this link:-
http://stackoverflow.com/questions/9647355/open-file-after-download-completed[^]


这篇关于下载后打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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