编程语言
首页 > 编程语言> > asp.net-在JavaScript中显示Modalpopup

asp.net-在JavaScript中显示Modalpopup

作者:互联网

我有一个模态弹出窗口扩展器,如下
 
        

<div id="target" runat="server"></div>
<cc1:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID ="Modal"
    runat="server" TargetControlID="target"
    BackgroundCssClass="modalBackground"
    PopupControlID="Panel1"></cc1:ModalPopupExtender>

<asp:Panel ID="Panel1" runat="server">
  <asp:Login ID="Login1" Width="360px" Height="135px" BackColor="lightSteelBlue"
        LoginButtonStyle-BorderStyle="groove" TextBoxStyle-CssClass="textbox"
        LoginButtonStyle-CssClass="loginbutton" runat="server" >
    <TextBoxStyle CssClass="textbox" />
    <LoginButtonStyle BorderStyle="Groove" CssClass="loginbutton" />
  </asp:Login>
</asp:Panel>

在单击一个按钮时,我必须显示modalpopup.
我可以用JavaScript编写什么代码来调用modalpopup.任何人都可以帮忙.

解决方法:

var modalDialog = $find("ModalPopupExtender1"); 
// get reference to modal popup using the AJAX api $find() function

  if (modalDialog != null) {
    modalDialog.show();
  }

标签:modalpopupextender,popup,modal-dialog,asp-net,javascript
来源: https://codeday.me/bug/20191210/2102361.html