Tuesday, February 26, 2013

Update progress bar


 <asp:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="pnlPopup" BehaviorID="mdlPopup"
        PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" />
    <asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none;
        border: none; background: none" Height="100px" Width="200px  ">
        <div align="center" style="margin-top: 13px;">
            <img src="../App_Themes/Theme1/Images/progressbar_1.gif" />
        </div>
    </asp:Panel>


<script type="text/javascript">
<!--
//-->

         //  register for our events
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);  
           
            function beginRequest(sender, args){
                // show the popup
                $find('mdlPopup').show();      
            }

            function endRequest(sender, args) {
                //  hide the popup
                $find('mdlPopup').hide();
            }


    </script>


<style >
        .modalBackground
        {
            background-color: gray;
            filter: alpha(opacity=60);
            opacity: 0.6;
        }
        .modalPopup
        {
            background-color: White;
            border-width: 1px;
            border-style: solid;
            border-color: Gray;
            padding: 0px;
        }
    </style>


No comments:

Post a Comment