我有一个包含用户控件(.ascx)的 ModalPopupExtender。
我想通过使用用户控件(.ascx)中的按钮单击来关闭弹出窗口。
我想在客户端做(Jquery,Javascript)
模态弹出扩展器:
<asp:HiddenField ID="hidPopup" runat="server" />
<ajaxToolkit:ModalPopupExtender ID="Surface1ModulePopup" PopupControlID="divPopup"
runat="server" TargetControlID="hidPopup" CancelControlID="btnimageclose" >
</ajaxtoolkit:ModalPopupExtender>
<div id="divPopup" class="over_line" style="visibility:hidden;">
<div class="TxConsultPopUp_Window" style="background-color: #f2fbff; height: 235px;
width: 156px; border: 1 px solid #4490d2; margin-left: -140px; margin-top: 0px;">
<div class="forg_head">
<div class="head_txt" style="width: 119px; text-align: left;">
Surface Selections</div>
<div class="close_but" style=" width:26px;">
<asp:ImageButton ID="btnimageclose" runat="server" ImageUrl="images/close.png" OnClientClick="javascript:CloseWin();return false;" />
</div>
</div>
<asp:Panel ID="panel1" runat="server">
<UC1:Surface id="Surf1Surface" runat="server">
</UC1:Surface>
</asp:Panel>
</div>
</div>
要打开它,我使用了这个:
var modalPopupBehaviorCtrl = $find('<%=Surface1ModulePopup.ClientID %>');
modalPopupBehaviorCtrl.show();
var ScheduledTreatments = document.getElementById("divPopup");
ScheduledTreatments.style.visibility = "visible";
请帮助我等待 1 天的答复。StackFLOW 专家请答复