protected void Page_Load(objectsender, EventArgs e)
{if (Request.Browser.Browser.ToLower() != "chrome")
{string filePath = Server.MapPath("pdf/19-P1012728-064_ZHCN-Draft.pdf");
Response.ClearContent();
Response.ClearHeaders();string FilePost = filePath.Substring(filePath.Length - 3).ToLower();switch(FilePost)
{case "pdf":
Response.ContentType= "application/PDF";break;case "doc":
Response.ContentType= "application/msword";break;case "xls":
Response.ContentType= "application/vnd.ms-excel";break;default:
Session["ErrorInfo"] = "不支持的文件格式:" +FilePost;
Response.Redirect("ErrorPage.aspx");break;
}
Response.WriteFile(filePath);
Response.Flush();
Response.Close();
Session.Remove("Report");
}el