I've a Image in a UpdateProgress-Control combined with a ModalPopupExtender. To open the Extender when the site is loading, Iam using following Javascript:
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(showPopup);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(hidePopup);
function showPopup(sender, args) {
var ModalControl = '<%= ModalPopupExtender1.ClientID %>';
$find(ModalControl).show();
}
function hidePopup(sender, args) {
var ModalControl = '<%= ModalPopupExtender1.ClientID %>';
$find(ModalControl).hide();
}
</script>
This is working fine, but the Extender opens now every single Request. It only should open when a specific UpdatePanel was forced to refresh (UpdatePanelMain). How can I do it in Javascript like: if(postbackelement == UpdatePanelMain) or something?