简体   繁体   English

单击链接时弹出

[英]Popup when a link is clicked

I need a popup when a link is clicked. 单击链接时我需要弹出窗口。 But in the page load itself, popup is shown at the bottom of the page. 但是在页面加载中,弹出窗口显示在页面底部。 I want it to be shown only when the link is clicked. 我希望它仅在单击链接时显示。 Where am i doing wrong?? 我在哪里做错了? Please help me out guys! 请帮帮我们! I am a learner. 我是学习者。 Thanks a lot! 非常感谢!

<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>

Try change 尝试改变

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

to

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

希望你的页面/样式表上有modalBackground css吗?

Woworks是正确的onClick on link set pnlPagePopup.Visible = true;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM