2009-09-28 78 views

回答

3

我用这个函数:

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); 
    } 
    } 

,并呼吁:

ShowModalPopup('<%= modalpopup.ClientID %>', 20001); 
0

您可以挂钩的处理程序对modalpopup所示的事件,可以让你设置zIndex的:

function pageLoad() 
{ 
    var popup = $find('ModalPopupClientID'); 
    popup.add_shown(SetzIndex); 
} 

function SetzIndex(sender,args) 
{ 
    sender._container.style.zIndex=9990001; 
} 
5

我分配一个CSS类到面板我的modalpopupextender分配给(PopupControlID),并把somthing如:

.ModalSelect 
{ 
    z-index:70000 !important; 
    /*other css*/ 
}