I am using this function:
function ShowModalPopup(modalPopupId, zIndex) { try { if (modalPopupId == null) throw new Error(0, 'Incorrect value of param modalPopupId!'); var modalPopupBehavior = $find(modalPopupId); if (modalPopupBehavior == null) throw new Error(0, 'Not found modal popup ' + modalPopupId + '!'); zIndex = typeof (zIndex) != 'undefined' ? zIndex : null; if (zIndex != null) { modalPopupBehavior._backgroundElement.style.zIndex = zIndex; modalPopupBehavior._foregroundElement.style.zIndex = zIndex + 1; } modalPopupBehavior.show(); } catch (ex) { alert('Exception in ShowModalPopup: ' + ex.message); } }
and its call:
ShowModalPopup('<%= modalpopup.ClientID %>', 20001);
source share