System.IO.FileInfo file = new System.IO.FileInfo(xpath);
Response.Clear();
Response.Charset = "GB2312 ";
Response.ContentEncoding = System.Text.Encoding.UTF8;
//Response.ContentType = "application/octet-stream ";
Response.AddHeader( "Content-Disposition ", "attachment;filename= "+aaa.doc);
Response.ContentType = "application/octet-stream ";
Response.AddHeader( "Content-Length ", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.End();
点击下载后,文件的默认名字问wenjian.aspx,为什么不是aaa.doc呢?