我通过NODELIST得到了aa.txt,bb.txt,cc.txt
把这些文件放到了LISTVIEW里,chfile下
现在想下载这些文件,该怎么写,谢谢!!

解决方案 »

  1.   

    不是,应用程序
    就是用webclient.
    不知道该杂个转过切
                WebClient Client = new WebClient();
                Client.DownloadFile(ADDRESS  , @"C:\TEMP\"+);
    几个文件。。不知道杂个写
      

  2.   

     if (File.Exists(fileRootPath))
            {
                FileInfo fi = new FileInfo(文件路径);
                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.ClearHeaders();
                HttpContext.Current.Response.Buffer = false;
                HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(文件名,System.Text.Encoding.UTF8));
                HttpContext.Current.Response.AppendHeader("Content-Length", fi.Length.ToString());
                HttpContext.Current.Response.ContentType = "application/octet-stream";
                HttpContext.Current.Response.WriteFile(文件路径);
                HttpContext.Current.Response.Flush();
                HttpContext.Current.Response.End();
                //出现终止线程的错误,因此去掉Response.End()的方法,而用下面的方法
               // HttpContext.Current.ApplicationInstance.CompleteRequest();
            }