需要显示“正在加载” ASP.NET 2.0-3.5 页面上的面板

发布于 2024-07-25 19:33:23 字数 297 浏览 2 评论 0原文

我有一个页面显示一个网格视图,其中包含一些复选框和下拉列表来过滤结果。 但是,访问数据库以获取 gridview 绑定到的数据可能会很长。

我尝试了进程中“更新...”消息的各种示例中的方法,但它们似乎都是用于回发的。 像 Gmail 上传风格的动画“处理...”面板等 - 但我需要一些在页面第一次加载时起作用的东西。

它是非常简单的 ASP.NET(最高 3.5),带有一点 AJAX 和 VB 代码隐藏。

该页面的任何解决方案都必须足够“模块化”,以便可以在该项目生命周期后期变得更加复杂的其他页面上实现。

I have a page that displays a gridview with some checkboxes and drop-down lists to filter the results. However, the trip to the database to get the data that the gridview binds to can be lengthy.

I tried methods from various examples of in-process "Updating..." messages but they all seem to be for postbacks. Things like animated "Processing..." panels that are done Gmail-uploading style, etc - but I need something that works when the page is loading for the first time.

It's pretty simple ASP.NET (up to 3.5) with a little bit of AJAX and VB code-behind.

Any solution for this page has to be 'modular' enough that it can be implemented on other pages that are going to be FAR more complex later on in this project's life.

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

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

发布评论

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

评论(2

方觉久 2024-08-01 19:33:23

加载页面内容(无网格),然后进行远程调用以启动冗长的检索过程可能会为您提供最好的服务。 这里是一篇文章可以帮助您延迟加载。 要在全局(页面)级别启用进度条,您可以执行以下操作:

$(document).ready(function() {
$.ajaxStart(function() { $(".progressBar").show();});
$.ajaxStop(function() { $(".progressBar").hide();});
});

编辑:忘记提及我的示例以及 Dave Ward 的帖子是使用 jQuery 完成的!

You would probably be best served by loading the page's content (sans grid), then making a remote call to kick off the lengthy retrieval process. Here is an article that can help you with the deferred loading bit. To enable the progress bar on a global (page) level, you can do something like this:

$(document).ready(function() {
$.ajaxStart(function() { $(".progressBar").show();});
$.ajaxStop(function() { $(".progressBar").hide();});
});

EDIT: forgot to mention that my example as well as Dave Ward's post are done using jQuery!

海风掠过北极光 2024-08-01 19:33:23

您可以使用 asp:UpdateProgress,但您可能会发现它在更复杂的页面上受到一定限制。 但它很容易实现。

You could use asp:UpdateProgress, but you may find that it is somewhat limited on more complex pages. It's very easy to implement though.

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