最佳"装载"反馈ASP.Net? [英] Best "Loading" feedback for ASP.Net?

查看:129
本文介绍了最佳"装载"反馈ASP.Net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我们有一个ASP.Net应用程序 - 相当标准 - 在有很多的UpdatePanel,并回发

So, we have an ASP.Net application - fairly standard - and in there are lots of updatepanels, and postbacks.

在一些网页,我们有

<ajax:UpdatePanelAnimationExtender ID="ae" runat="server" TargetControlID="updatePanel" BehaviorID="UpdateAnimation">
    <Animations>
        <OnUpdating>
            <FadeOut Duration="0.1" minimumOpacity=".3"  />
        </OnUpdating>
        <OnUpdated>
            <FadeIn minimumOpacity=".5" Duration="0" />
        </OnUpdated>
    </Animations>
</ajax:UpdatePanelAnimationExtender>

这基本上白人出的页面时,回发是怎么回事(但这种冲突与模态对话框灰色背景)。在某些情况下,我们有一个progressupdate控制刚刚已经在页面的中间一个spinny图标

Which basically whites out the page when a postback is going on (but this clashes with modal dialog grey backgrounds). In some cases we have a progressupdate control which just has a spinny icon in the middle of the page.

但他们都不特别好,所有有点笨重。他们还要求在各地的应用程序不同的地方有很多code。

But none of them seem particularly nice and all a bit clunky. They also require a lot of code in various places around the app.

做了什么方法,其他人使用,并找到有效的?

What methods do other people use and find effective?

推荐答案

和其他人一样,我建议使用的UpdateProgress在一个模式弹出。

Like the others, I suggest to use the UpdateProgress in a modal popup.

我会添加这个扭曲,把弹出,的UpdateProgress这code在母版,所以当你需要它,只需将母版的内容页面。

I will add this twist, put the popup, UpdateProgress and this code in a masterpage, so whenever you need it, just plug the masterpage to the content page.

 <script type="text/javascript">
 var ModalProgress ='<%= ModalProgress.ClientID %>';
  Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq); 
  Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);    
  function beginReq(sender, args){     
  // shows the Popup     
  $find(ModalProgress).show();        
  }  
  function endReq(sender, args) 
  {     
  //  hide the Popup     
  $find(ModalProgress).hide(); 
  }

</script>

下面一些参考:

http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html

http://vincexu.blogspot.com/2008/10/how-to-make-modalupdate-progress-bar-on.html

这篇关于最佳&QUOT;装载&QUOT;反馈ASP.Net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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