/// <param name="strDownloadFile">绝对路径</param>
public void HTTP_DownloadFile(string strDownloadFile)
{
// strDownloadFile 是绝对路径,可以通过 Server.MapPath 提供
string strShortFileName = Path.GetFileNameWithoutExtension(strDownloadFile);
string strClientFileName = strShortFileName.Substring(0,strShortFileName.Length - 18)
+ Path.GetExtension(strDownloadFile);
strClientFileName = Server.UrlEncode(strClientFileName);
pge_client.Response.Clear();
pge_client.Response.ContentType = "application/octet-stream";
pge_client.Response.AddHeader("Content-Disposition", "attachment;filename=" + strClientFileName);
pge_client.Response.Flush();
pge_client.Response.WriteFile(strDownloadFile, false); // 下载文件
pge_client.Response.End(); // 此句不能缺少,否则会把本页的HTML源码写在文件里
}