Silverlight 实现下载文件功能!
最近一直在做Siverlight的有关的项目,今天做了一个下载功能,也是经过网上找的各种办法才得到以下的结果,我来总结一下。如果哪有不对的或者哪块有错误的还请各位进行指出来!谢谢! 在sl中的下载,我认为很难做到像c#中的下载。可以弹出一个对话框进行保存或者另存为的样子。 下面是通过:WebClientDownHandler文件进行的! using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; namespace E9.Server { /// <summary> /// Summary description for WebClientDownHandler /// </summary> public class WebClientDownHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { String fileName = context.Request.QueryString["fileName"]; //客户端保存的文件名 fileName=HttpUtility.UrlDecode(fileName); String