当前位置: 动力学知识库 > 问答 > 编程问答 >

ASP.NET MVC Ajax LoadingELement on loading a page

问题描述:

I'm looking on how exactly I can show a "loading element" while the page is first requested. Most examples I find, explain on how to show a "loading element" on an Ajax.BeginForm or Ajax.ActionLink...

What I'm trying to do is having a couple of dashboards.

When the user requests the page, the dashboards are shown immediately, but the data is still being loaded.

While the data is being loaded, a "loading element" should appear in the dashboard.

So, some sort of Ajax.RenderPartial, but that does not exist :)

网友答案:

In this case you could show the loading element immediately when the page is first requested along with the dashboards and hide it later when those dashboards are finished loading. There's the endRequest event you could subscribe to.

分享给朋友:
您可能感兴趣的文章:
随机阅读: