我想你可以嘗試使用Ajax Control Toolkit庫中的Modal Popup Extender。例如見http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx。
來自Ajax控件工具包庫的所有控件都與客戶端支持(此類控件的其他名稱是Ajax控件)的Web服務器控件(擴展器)相關。
所以,如果你將審查所使用模式彈出頁面的渲染源,你將能夠找到下面的客戶端組件創建使用以下JS:
Sys.Application.add_init(function() {
$create(Sys.Extended.UI.ModalPopupBehavior, {"BackgroundCssClass":"modalBackground","DropShadow":true,"PopupControlID":"ctl00_SampleContent_programmaticPopup","PopupDragHandleControlID":"ctl00_SampleContent_programmaticPopupDragHandle","dynamicServicePath":"/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx","id":"programmaticModalPopupBehavior","repositionMode":2}, null, null, $get("ctl00_SampleContent_hiddenTargetControlForModalPopup"));
});
所以,這意味着您可以在客戶端動態創建模態彈出窗口。您也可以使用以下JS調用特定的模式彈出行爲客戶端方法:
$find("programmaticModalPopupBehavior").show();
但是如何在客戶端上使用它也 – skhurams