【问题标题】:Popup when a link is clicked单击链接时弹出
【发布时间】:2011-03-25 06:36:38
【问题描述】:

点击链接时我需要一个弹出窗口。但是在页面加载本身中,弹出窗口显示在页面底部。我希望它仅在单击链接时显示。我在哪里做错了??请帮帮我!我是一个学习者。非常感谢!

<cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonExtender4"
                runat="server" TargetControlID="lnkremoveloc" Enabled="False" OnClientCancel="RemoveLocations">
            </cc1:ConfirmButtonExtender>
            <cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="btnDisable" CancelControlID="btnCancel"
                BackgroundCssClass="modalBackground" PopupControlID="pnlRemove" TargetControlID="lnkremoveloc"
                runat="server">
            </cc1:ModalPopupExtender>
            <asp:Panel CssClass="modalPopup" ID="PnlRemove" runat="server">
                <!-- Common Popup Control Begin -->
                <table class="tblCommonPopup" width="400" cellpadding="0" cellspacing="0">

                <tr>
                    <td class="topLeft">
                    </td>
                    <td class="topMiddle">
                    </td>
                    <td class= "topRight">
                    </td>
                </tr>
                <tr>
                    <td colspan="5" class="middle" align="center">--%>
                        <!-- Content Area Begin -->
                        <table>
                            <tr>
                                <td colspan="1" style="padding-top: 10px;" title="Select">

                                </td>
                                <td colspan="4" style="padding-top: 10px;" title="Location Name">

                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="5">
                                    <input id="btnDisable" type="button" value="Disable" class="popupButton" />
                                    <input id="Cancel" type="button" value="Cancel" class="popupButton" />
                                </td>
                            </tr>
                        </table>
                        <!-- Content Area Ends -->
                    </td>
                </tr>
                <tr>
                    <td class="bottomLeft">
                    </td>
                    <td class="bottomMiddle">
                    </td>
                    <td class="bottomRight">
                    </td>
                </tr>
            </table>
            <!-- Common Popup Control End -->
       </asp:Panel>

【问题讨论】:

  • 您好,请贴出整个页面的代码,现在已经剪掉了。
  • 由于字符限制,我无法在此处发布整个代码。请问还有其他选项,例如电子邮件 ID 吗??
  • 您可以使用pastie.org分享您的代码
  • 我把它贴在那里了!! 1075108 请帮帮我...谢谢!

标签: c# javascript asp.net html


【解决方案1】:

尝试改变

<asp:Panel ID="pnlPagePopup" Style="display: none;" runat="server" >

<asp:Panel ID="pnlPagePopup" Visible="false" runat="server" >

【讨论】:

    【解决方案2】:

    希望modalBackgroundcss 在您的页面/样式表上有吗?

    【讨论】:

      【解决方案3】:

      Woworks 是正确的 和 onClick 链接设置 pnlPagePopup.Visible = true;

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-19
        • 2015-12-03
        • 2018-11-08
        • 1970-01-01
        • 2017-11-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多