如何在客户端打开页时,也就是在LOAD事件中用FileStream类.File类用文件流的方法把服务器虚拟目录中的文件,生成文件,放到客户端指定的目录。有好的思路也给分.

解决方案 »

  1.   

    在客户端写入一段javascript来
    访问用File生成的那个文件
      

  2.   

    Page.Response.Clear();
    Page.Response.ContentType = "Application/octet-stream";
    Response.AppendHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(savingFileName));
    Page.Response.WriteFile(Configuration.UploadedFilesStoragePosition+"//"+filename);
    Page.Response.Flush();
    Page.Response.End();