ok!
一般送个2级玉米,
可以把东西传到>
给你提供一点代码:
string fileURL = thisServerMapPath("你要下载的文件路径");//文件路径,可用相对路径
FileInfo fileInfo = new FileInfo(fileURL);
ResponseClear();
ResponseAddHeader("content-disposition", "attachment;filename=" +
ServerUrlEncode(fileInfoNameToString()));//文件名
ResponseAddHeader("content-length", fileInfoLengthToString());//文件大小
ResponseContentType = "application/octet-stream";
ResponseContentEncoding = SystemTextEncodingDefault;
ResponseWriteFile(fileURL);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)