
When I try to download from Chrome, it works fine, but in IE 8 it does not load, it shows the error above,
protected void btn_ExcelDownload_Click(object sender, EventArgs e) { Grid_UserTable.Columns[0].Visible = false; string subject = lbl_Subj.Text; Response.Buffer = true; Response.Clear(); Response.ClearHeaders(); Response.AddHeader("Cache-Control", "no-store, no-cache"); Response.AddHeader("content-disposition", "attachment;filename=" + subject + "-Status.xls"); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.ms-excel"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); Grid_UserTable.RenderControl(htmlWrite); rptList.RenderControl(htmlWrite); Response.Write(stringWrite.ToString()); Response.End(); }
When I used the developer tool in chrome, it gave the Resource interpreted as Other, but was translated with the MIME type undefined. but uploaded the file, but IE throws the error shown in the image, what should I do, thanks.
I can upload a file in IE8 when I launch a website using Visual studio, but when I try to download it from a website that uploads to the server, I get the above error. The error is only in IE 8.
I tried to enable and disable IE browser compatibility mode, even then I get the same error.
This is my main content.
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server"> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
source share