Image

In the Master page, we add the following script,

<%-- Modal PopUp-- %>

<script type="text/javascript" language="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
var delay = function() {
var cmb = $find('<%=mdlPopup.ClientID %>');
cmb.show();
$('#<%=mdlPopup.ClientID %>').html("<img src='../Images/Progress.gif' alt=''/>");                      
};                    

setTimeout(delay, 10);

}



function endRequest(sender, args) {
//  hide the popup
$find('<%=mdlPopup.ClientID %>').hide();
}

</script>
   


Within the Update Pannel we define the content templates and the below part for show the pop up.


<asp:UpdatePanel ID="upLoginMaster" runat="server" UpdateMode="Always">

<%--   Start Edited by shan for Modal PopUp--%>

<div>
<ajaxtoolkit:modalpopupextender id="mdlPopup" runat="server" targetcontrolid="pnlPopup" popupcontrolid="pnlPopup"
backgroundcssclass="modalBackground" />

<asp:Panel ID="pnlPopup" runat="server" CssClass="updateProgress" Style="display: none">
<div align="center" style="margin-top: 13px;">
<img src="../Images/Progress.gif" alt="" />
</div><br />
<span class="updateProgressMessage" style="font-weight: bold;color:Navy;">Processing.Please wait...</span></asp:Panel>
                                                    </div>
<%--   End Edited by shan  for Modal PopUp--%>

</asp:UpdatePanel>


Every page Page request the Progress whenever the page postback time.

Comments (0)