单击链接时需要弹出窗口。但是在页面加载中,弹出窗口显示在页面底部。我希望它仅在单击链接时显示。我在哪里做错了?请帮帮我们!我是学习者。非常感谢!
<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>
答案 0 :(得分:1)
尝试更改
<asp:Panel ID="pnlPagePopup" Style="display: none;" runat="server" >
到
<asp:Panel ID="pnlPagePopup" Visible="false" runat="server" >
答案 1 :(得分:0)
希望modalBackground
css在您的页面/样式表上?
答案 2 :(得分:0)
Woworks是对的 和onClick on link set pnlPagePopup.Visible = true;