如何在aspx页面(WebForms的)等待过程中显示,而一些方法被执行 [英] How to show in aspx page (WebForms) the wait process while some method is executing

查看:213
本文介绍了如何在aspx页面(WebForms的)等待过程中显示,而一些方法被执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能显示某些类型的信息在我的ASPX页面(我使用的WebForms,而不是MVC 的),从而重新presents为等待过程,而一些方法我的项目正在执行。

How can I show some type of message in my ASPX web page ( I'm using WebForms, not MVC ), which represents as a "wait process" while some method of my project is executing.

我不要求有关如何使一些HTML / CSS / DOM的东西,我问更多有关异步检查。

I'm not asking about how to make some HTML/CSS/DOM stuff, I'm asking more about asynchronous check.

对于例如:从网上的一些数据可能会无法迅速传递到客户端,当它发生 - 它看起来很丑陋的用户。它只是空转,看起来像有错误,在没有很好高亮显示状态的页面(很多用户并不在浏览器中观看网页的加载状态,他们想看看它在Web应用程序完全相同,就像在桌面应用程序)。

For e.g.: some data from web could be delivered to client not quickly and when it does occur - it looks very ugly for the user. It's just idling and looks like a page with bug, where there is no well highlighted status ( many users don't watch in browsers the page loading states, they want to look it in web applications exactly, like in desktop applications ).

我要显示这样的消息 等待操作结束
我不知道如何使异步查一下我的ASPX页面获取的当前状态,当一些方法来执行(是他们完成与否等等... 的)。

I want to show a message like "waiting for the operation end" and I don't know how to make an asynchronous check in my ASPX page for getting the current state when some methods execute ( are they finished or not etc... ).

我真正想要看起来像假code:

What I really want looks like in pseudo-code:

while (methodExecuting) show(waitMessage);

怎么可能在ASP.NET项目的WebForms办?

How could it be done in WebForms of ASP.NET project?

推荐答案

我建议你使用一个进度定期说明你的条件。
这里是一个很好的链接解释一步一步如何使用它。

I suggest you use a "progressBar" indicating your condition periodically. Here is a good link explaining step by step how to use it.

<一个href=\"http://weblogs.asp.net/seanmcalinden/archive/2009/11/15/asynchronous-processing-in-asp-net-mvc-with-ajax-progress-bar.aspx\"相对=nofollow>在ASP.Net异步处理与阿贾克斯的进度酒吧

您可以在下面的下载此解决方案:的http://weblogs.asp.net/blogs/seanmcalinden/Solutions/AjaxProgressBarExample.zip

You can download this solution at the following: http://weblogs.asp.net/blogs/seanmcalinden/Solutions/AjaxProgressBarExample.zip

这篇关于如何在aspx页面(WebForms的)等待过程中显示,而一些方法被执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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