使用jQuery显示asp:ModalPopupExtender

|| 我正在尝试使用jQuery显示asp:ModalPopupExtender,但没有成功。这是我所拥有的: ASP.NET
<asp:ModalPopupExtender BehaviorID=\"confirmPopup\" ID=\"confirmPopup\" runat=\"server\" />
JAVASCRIPT
function ShowConfirmPopup() {
    var _id = \'#<%= confirmPopup.ClientID %>\';
    var modal = $find(_id);
    modal.show();
}
发生的情况是
modal
始终等于
null
,因此从不显示弹出窗口。我究竟做错了什么?     
已邀请:
$ find()不是jQuery的一部分,而是ASP.NET AJAX的一部分。因此,您不应该在行为ID前面加上一个井号:
function ShowConfirmPopup()
{
    var modal = $find(\"confirmPopup\");
    modal.show();
}
    

要回复问题请先登录注册