我如何可以改变.Netajax模块扩展器Z-索引。默认情况是1000-01。多谢。
我为面板分配了一个CSS类,我的模块扩展器被分配到(波普控制器),并放置了一些东西,比如:
.ModalSelect
{
z-index:70000 !important;
/*other css*/
}
我使用这个功能:
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);
您可以将一个处理程序连接到模块弹出器上的显示事件,该程序允许您设置ZRET:
function pageLoad()
{
var popup = $find('ModalPopupClientID');
popup.add_shown(SetzIndex);
}
function SetzIndex(sender,args)
{
sender._container.style.zIndex=9990001;
}