“文件下载”后刷新 UpdatePanel对话框

发布于 2024-08-06 22:49:42 字数 255 浏览 1 评论 0原文

我在更新面板中有一个用户控件。单击按钮时,我会从此用户控件内部触发“导出到 Excel”。一切正常。我收到文件下载框。当“文件下载”框关闭时,我希望更新面板回发或刷新。

这是因为以下原因,

我在用户控件中为每个服务器提交事件触发一个“请稍候”div。现在,当单击“导出”按钮时,将引发 div showwait。但文件下载后,没有回发,控制权也没有返回到服务器。因此 Stopwait div 根本不参与。

关闭“文件下载”框后如何使更新面板发回?

I have a User control inside an Update Panel. I trigger a Export to excel from inside this user control on button click. Everything works fine. I get the File Download box. When the "File Download" box is closed, I want the updatepanel to post back or refresh.

This is because of the following,

I trigger a "Please wait" div in the User control, for every server submit event. Now, when the Export button is clicked, the div showwait is thrown. But after File Download, there is no postback and the control does not come back to the server. Hence the Stopwait div is not involved at all.

How do i make the update panel post back after closing "File Download" box is closed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤芳又自赏 2024-08-13 22:49:42

我找到了这个问题的答案。单击导出按钮时,我调用 onclientclick 方法并将 javascript 变量指示器设置为 1。

在 showwait 方法上,如果 ind 为 1,则不显示等待消息。然后在方法内重置指示器。

因此,不要只等待单击“导出”按钮的消息! :)

I found an answer for this. When the export button is clicked, I called onclientclick method and set a javascript variable indicator to 1.

On showwait method, if ind is 1 i dont show the wait message. And then reset the indicator inside the method.

Hence not wait message only for Export button click! :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文