private void Page_Load(object sender, System.EventArgs e) 

string path = Server.MapPath(Request.Params["File"]); 
System.IO.FileInfo file = new System.IO.FileInfo(path); Response.Clear(); 
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); 
Response.ContentType = "application/octet-stream"; 
Response.WriteFile(file.FullName); 
Response.End(); 
} 不要通过打开窗口访问 直接链接路径
<a href="download.aspx?file=filename.ext">下载</a>