UpdatePanel and UpdateProgress Position Control

.content
{
position: relative; width:100%
}
.updateprogresswrapper {
            text-align:center; 
            position:absolute;
            opacity:0.5; 
            vertical-align: middle; 
            z-index: 1000;
            height: 100% !important; 
            width: 100%  !important;
            overflow:hidden;
            background-color:gray;
            top:0px; 
            bottom: 0px; 
            left: 0px; 
            right: 0px
        }
        
        .updateprogressindicator {
            top:50%; 
            position: relative
        }

<div class="content">
<asp:UpdatePanel runat="server" ID="updpnl2" ChildrenAsTriggers="true" UpdateMode="Conditional">
            <ContentTemplate>
                 <asp:updateprogress id="UpdateProgress1" runat="server" associatedupdatepanelid="updpnl2" dynamiclayout="true"
                        DisplayAfter="0">
                            <progresstemplate>
                                <div class="updateprogresswrapper">
                                    <div class="updateprogressindicator">
                                            <img src="../images/ajax-loader_2.gif"/>
                                    </div>
                                </div>
                            </progresstemplate>
                  </asp:updateprogress>
....


The source of Html page will like

<div class="content">
<div id="MainContent_updpnl2">
                 <div id="MainContent_UpdateProgress1" style="display: none; " role="status" aria-hidden="true">
	
                                <div class="updateprogresswrapper">
                                    <div class="updateprogressindicator">
                                            <img src="../images/ajax-loader_2.gif">
                                    </div>
                                </div>

So put UpdateProgress inside UpdatePanel can easily control UpdateProgress to only cover the UpdatePanel instead of the whole web page.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值