FileInfo DownloadFile = new FileInfo(createPath);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF32));
Response.AddHeader("Content-Length", DownloadFile.Length.ToString());
Response.TransmitFile(DownloadFile.FullName);
Response.Flush();
//Response.End();
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF32));
Response.AddHeader("Content-Length", DownloadFile.Length.ToString());
Response.TransmitFile(DownloadFile.FullName);
Response.Flush();
//Response.End();
解决方案 »
- 如何在asp.net网页 打开本地的exe文件
- 求大婶指点迷津
- 急!!页面调用后台方法时出现的错误
- iframe的问题
- 怎么用脚本控制Panle的显示?
- *********** 在DATAGRID控件里的数据怎么分2列显示?
- 哪位会网页美工的同志帮帮忙啊?很急。。关系到我的人生道路。。
- 急,为什么我上传远程服务器会出现这样的问题,在本地有用,
- Cookies 最大值 C#
- 查看服务器磁盘、文件????listdrives怎么不能联接到listdir或联接到showfile
- 关于Request.QueryString[]奇怪的问题,请高手指点下
- asp.net 2.0的webform怎么转换为asp.net1.1?
what is your response encoding?