显示阿贾克斯装载机,而页面呈现 [英] Display Ajax Loader while page rendering

查看:149
本文介绍了显示阿贾克斯装载机,而页面呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个简单的问题,但我怎样才能最好地使用AJAX装载机在ASP​​.NET中提供了装载对话框,而该页面正在建设?

This is probably a simple question but how can I best use an AJAX loader in ASP.NET to provide a loading dialog whilst the page is being built?

目前,我有一个关联的UpdateProgressPanel其中包含了ProgressTemplate加载消息和GIF一个UpdatePanel。

I currently have an UpdatePanel with an associated UpdateProgressPanel which contains the loading message and gif in a ProgressTemplate.

目前我有一个页面,该页面的onLoad()去,并得到业务实体,然后显示出来。虽然是这样做的,我想展示一个AJAX加载器。

Currently I have a page that onLoad() goes and gets the business entities and then displays them. While it is doing this I would like to display an AJAX loader.

这将是最好有没有在页面加载,并有一个隐藏的按钮被触发的onLoadComplete或卸载(),这将然后等待按钮点击的方法来完成显示UpdateProgressPanel?

Would it be better to have nothing in the page load and have a hidden button that is triggered onLoadComplete or unLoad() which would then wait for the button click method to complete displaying the UpdateProgressPanel?

推荐答案

我已经做了一个Timer控件类似的东西。你的OnLoad刚打开计时器,并在页面完成渲染。然后定时器(有一些最小间隔值)做肮脏的工作,表现出正常的进度面板。记得关闭计时器的过程的最后步骤。

I've done something similar with a Timer control. Your OnLoad just turns on the timer, and the page finishes rendering. Then the timer (with some minimal interval value) does the dirty work, showing the progress panel correctly. Remember to turn off the timer as the last step of the process.

这篇关于显示阿贾克斯装载机,而页面呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆