在页面刷新之前,Response.End()不允许进行任何其他操作 [英] Response.End() doesn't allow anything else to do until page refreshes
问题描述
要将数据从数据表导出到excel,我曾经做过这项工作:
To export the data from datatable to excel, I've used to do the job:
https://www.codeproject.com/Articles/406704/Export-DataTable-to-Excel-with-Formatting-in-Cshar
https://www.codeproject.com/Articles/406704/Export-DataTable-to-Excel-with-Formatting-in-Cshar
对我来说很好.但是,Response.End()关闭了我的代码逻辑,这意味着页面停止响应,直到我刷新页面为止.我也用过
It is working perfectly fine to me. However, Response.End() closes my code logic which means page stops responding until i refresh the page. I've also used
HttpContext.Current.ApplicationInstance.CompleteRequest();
Response.Close();
HttpContext.Current.ApplicationInstance.CompleteRequest();
Response.Close();
但是它也在做同样的事情.
but it is also doing the same thing.
我的页面还有其他网格和选项,这些网格和选项应该对最终用户有效,而不是要求最终用户刷新页面.
My page has other grids and options which should work for end-user instead of asking end-user to refresh the page.
Sohaib Khan
Sohaib Khan
推荐答案
请检查以下内容
please check the below
https://social.technet.microsoft.com/Forums/office/zh-CN/8e7ecd7b-3d59-4628-9da0-f79d258a71a2/responseend?forum=sharepointdevelopmentlegacy
https://social.technet.microsoft.com/Forums/office/en-US/8e7ecd7b-3d59-4628-9da0-f79d258a71a2/responseend?forum=sharepointdevelopmentlegacy
这篇关于在页面刷新之前,Response.End()不允许进行任何其他操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!