其他分享
首页 > 其他分享> > .net 正在中止线程

.net 正在中止线程

作者:互联网

HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment;  filename={0}.xlsx", HttpUtility.UrlEncode(strFileName, Encoding.UTF8)));
                HttpContext.Current.Response.ContentEncoding = Encoding.UTF8;

                HttpContext.Current.Response.Buffer = true;
                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.BinaryWrite(pck.GetAsByteArray());

                //HttpContext.Current.ApplicationInstance.CompleteRequest();
                HttpContext.Current.Response.End();

导出异常 点击调用方式不对,点击事件更改触发方式( EnableAjax="false")|| href=“方法”。

标签:中止,UTF8,HttpContext,Current,点击,线程,Encoding,net,Response
来源: https://www.cnblogs.com/jayrocking/p/11720237.html