IE8 下载时报错 ASP.NET

代码如下

Encoding encoding = Encoding.GetEncoding("GB2312");

            m_Page.Response.ContentEncoding = encoding;
            m_Page.Response.Charset = "gb2312";

           m_Page.Response.AddHeader("content-type", "application/x-msdownload");
                            (https://img-ask.csdn.net/upload/201506/17/1434517229_895786.png)m_Page.Response.ContentType = GetContentType(sFileType.ToLower());
            m_Page.Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(pFileName, Encoding.UTF8));

            m_Page.Response.AddHeader("Content-Length", data.Length.ToString());

            m_Page.Response.Clear();

            //将文件输出在页面上   
            m_Page.Response.OutputStream.Write(data, 0, data.Length);
            m_Page.Response.End();

图片说明

Encoding encoding = Encoding.GetEncoding("GB2312");
m_Page.Response.ContentEncoding = encoding;
m_Page.Response.Charset = "gb2312";

       m_Page.Response.AddHeader("content-type", "application/x-msdownload");
       m_Page.Response.ContentType = GetContentType(sFileType.ToLower());
        m_Page.Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(pFileName, Encoding.UTF8));

        m_Page.Response.AddHeader("Content-Length", data.Length.ToString());

        m_Page.Response.Clear();

        //将文件输出在页面上   
        m_Page.Response.OutputStream.Write(data, 0, data.Length);
        m_Page.Response.End();


```在IE9上能正常下载

m_Page.Response.Clear();先注释一下试试

亲们还是不行啊,求大神指点

打开IE8的兼容视图试试看!