下载文件变成了aspx页面
Response.Clear();
// Specify the Type of the downloadable file.
Response.ContentType = "application/octet-stream";
// Set the Default file name in the FileDownload dialog box.
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlPathEncode(strFile));
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.Flush();
// Download the file.
Response.WriteFile(strFile);
其中strFile为特定指定路径的文件名,如:D:\05.doc
可是点击下载的时候,老是默认文件名是当前页面的名称,跟踪的strFile显示的明明是D:\05.doc,请教高手,怎么办??????