我可以使用silverlight在客户端的PC上写入文件吗 [英] Can i write a file on the client's PC using silverlight

查看:15
本文介绍了我可以使用silverlight在客户端的PC上写入文件吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个允许客户端从服务器下载文件的 Web 应用程序,到目前为止还不错,但是该文件必须经过某种编码,因此我需要在客户端对其进行解码并将其写入客户端 PC 上的文件.

I need to write a web application that allows the client to download a file from the server, so far so good, but the file must be kind of encoded, so i need to decode it on the client and write it on a file on the client's PC.

我可以使用 Silverlight 执行此操作吗?以及如何?

Can i do this using Silverlight? and how?

如果不可能,还有其他方法吗?.有什么建议吗?

If it is not possible, there is another way to do it?. Any suggestions?

谢谢

正如对 Brian Genisio 公开的那样,我可以要求用户许可来保存文件,所以我认为打开和保存对话框对我来说是可以的.但是,如果这还不够,有没有办法在有或没有用户交互的情况下将文件保存在隔离存储之外,例如为用户模拟新的下载?

As exposed for Brian Genisio, i can ask for user permision to save the file, so i think that the open and save Dialogs are ok for my case. But in case that that's not enough, is there a way to, with or without user interaction, to save the file outside of the isolated storage, for example emulating a new download for the user?

推荐答案

在 Silverlight 3.0 中,您可以通过 OpenFileDialog.在 Silverlight 2.0 中,您可以访问隔离的 Sotrage,它可以让您保存到沙箱.但是,如果没有用户许可,您可能永远无法完全访问文件系统.

In Silverlight 3.0, you will have access to read and write files via the OpenFileDialog. In Silverlight 2.0, you have access to Isolated Sotrage, which will let you save to a sandbox. You will probably never have full access to the file system without user permission, though.

这篇关于我可以使用silverlight在客户端的PC上写入文件吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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