解决方案 »

  1.   

    参见:http://blog.csdn.net/duanzi_peng/article/details/19037777
      

  2.   

    服务器端下载文件
    protected void dFile()
        {
            //判断是否选择文件名
            if (LisBoxFile.SelectedValue != "")
            {
                if (Session["txt"] != "")
                {   //获取文件路径
                    string path = Server.MapPath("File/") + Session["txt"].ToString();
                    //初始化 FileInfo 类的实例,它作为文件路径的包装
                    FileInfo fi = new FileInfo(path);
                    
                    //判断文件是否存在
                    if (fi.Exists)
                    {
                        //将文件保存到本机上
                        Response.Clear();
                        Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(fi.Name));
                        Response.AddHeader("Content-Length", fi.Length.ToString());
                        Response.ContentType = "application/octet-stream";
                        Response.Filter.Close();
                        Response.WriteFile(fi.FullName);
                        Response.End();
                    }
                }
            }
            else
            {
                Page.RegisterStartupScript("sb", "<script>alert('请您先选择文件名')</script>");
            }
        }
      

  3.   

    干货来了,可能要付出一点小的代价,值不值自己衡量~
    http://download.csdn.net/detail/chenandczh/3661723
      

  4.   

    下载类很多,http://www.cnblogs.com/wang726zq/archive/2012/07/30/ftp.html