1

我正在尝试使用 a在 ASP.netModalPopupExtender中弹出 a :Panel

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
      EnableScriptGlobalization="true" EnableScriptLocalization="true">

<asp:LinkButton ID="bbShowExport" runat="server" Text="Export"></asp:LinkButton>

<asp:Panel ID="popupExport" runat="server">
   ...
</asp:Panel>

<asp:ModalPopupExtender ID="popupExtender" runat="server" 
      PopupControlID="popupExport" TargetControlID="bbShowExport">
</asp:ModalPopupExtender>

这意味着我想在用户单击时popupExtender弹出。popupExportbbShowExport

访问页面时出现错误:

“popupExtender”的 TargetControlID 无效。该值不能为 null 或空。

我究竟做错了什么?

4

2 回答 2

0

在您的代码之前添加这一行

<Ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"/>
于 2012-09-17T21:00:59.330 回答
0

尝试这个 :

<asp:ScriptManager ID="ScriptMgrPopUp" runat="server"></asp:ScriptManager>
<asp:ModalPopupExtender ID="mpePopUpInformation" runat="server" PopupControlID="PanelInfo" TargetControlID="bbShowExport" CancelControlID="btnCloseInfo"></asp:ModalPopupExtender>
    <asp:Panel ID="PanelInfo" runat="server" CssClass="modalpopup">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" id="btnCloseInfo">×</button>
            <h3>Information</h3>
        </div>
        <div class="modal-body">
            <fieldset>
                Register Successfully Please Cek Email for Verification
            </fieldset>    
        </div>
    </asp:Panel>

<asp:LinkButton ID="bbShowExport" runat="server" Text="Export"></asp:LinkButton>
于 2017-09-28T01:46:11.313 回答