public class FileUploadArgs : EventArgs { public string FileName { get; set; } public Exception Ex { get; set; } } public class FileUploader { #region Member Variables /// <summary> /// The web client used to asynchronously upload data. /// </sum…
这里介绍的是一种利用WebClient手动发送Stream到服务器页面的上传文件方法. 一.服务器接收文件 这里使用一个ASHX页面来接收和保存Silverlight传来的Stream,页面代码如下: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; namespace Silverlight { /// <summary> /// File…