AJAX在被阻止的UI上调用进度可视化

时间:2015-06-18 12:33:13

标签: c# jquery asp.net ajax excel

我的项目是关于创建数千个项目的报告以及将这些报告作为Excel文件下载。目前,客户必须在被屏蔽的屏幕前等待,直到从数据库中读取项目并将其填入Excel文件,直到可以下载为止。

问题是,当我有大约4000个项目(每个项目有大约10个值)时,有时需要大约7-10分钟(取决于项目数量)来完成整个进度。屏幕被Response.Write()工具(外部代码)阻止。

为了更好的回复,我希望在此屏蔽屏幕中获得进展信息。目前它看起来像这样:

enter image description here

我必须告诉你,我使用AJAX,JQuery和JSON很糟糕。我知道我可以或不得不使用Response.Write(),但我真的不知道如何在AJAX中捕获这些响应。

下一个问题是 - 查询数据库和创建Excel工作表的整个过程是在一个单独的.cs文件中完成的 - 而不是在.aspx页面后面的代码中完成。

enter image description here

所以当没有 1. first method to get the items from DB 2. quering a few additional information for each item from DB 3. filling the DataTable with each item 4. second method to get other items from database 5. like 2. 6. like 3. 7. third method to get the last special items from DB 8. like 2. 9. like 3. 10. creating the Excel sheet 11. filling the Excel sheet 12. ready for download (BlockUI sets the screen free) 时,如何获取网站目前所做的信息?

网站/服务器在创建报告时一步一步地执行此操作:

PatternLayout

在C#区域,它看起来像

enter image description here

就是这样。我想要或需要的是一种带文本的进度条,向客户展示该程序目前正在做什么 - 我如何以最正常的方式实现这一点?

0 个答案:

没有答案