gpt4 book ai didi

asp.net - 如何在同一页面中显示两个模态弹出窗口?

转载 作者:行者123 更新时间:2023-12-04 06:23:09 27 4
gpt4 key购买 nike

我在同一个内容页面中使用了两个 modalpopupextenders,问题是当我显示一个时,它们都显示在另一个上。

我为 modalpopups 和面板使用了不同的 id,但问题仍然存在。

我正在使用母版页,并将我的 modalpopups 放在内容页面中。

有任何想法吗。

这是源代码:

<ajaxToolkit:ModalPopupExtender ID="mpeComment" runat="server" TargetControlID="btnHiddenComment"
PopupControlID="pnlComment" CancelControlID="Button1" OkControlID="btnHiddenComment"
BackgroundCssClass="modalBackground" PopupDragHandleControlID="CommentCaption"
Drag="True" DynamicServicePath="" Enabled="True">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel ID="pnlComment" runat="server" Style="display: none; background-color: #f5f5f5;
border: solid 3px #B8B8B8;" Width="500px">
<asp:Panel ID="CommentCaption" runat="server" Style="padding-bottom: 10px; cursor: move;
height: 30px;">
<table class="content_titre" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<asp:Label ID="lblTitre" runat="server"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
<table class="modalComment" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" style="height: 80px;" align="center" valign="top">
<table>
<tr>
<td>
&nbsp;&nbsp;&nbsp;
</td>
<td>
<span style="color: #F58076; font-size: 11px;">
<asp:Label ID="LblErreur" runat="server"></asp:Label></span>
</td>
</tr>
</table>
</td>
</tr>
<tr align="center">
<td align="center">
<asp:Button ID="btnHiddenComment" runat="server" Style="display: none" />
<asp:Button ID="Button1" runat="server" Style="display: none" />
</td>
<td align="center">
<div class="login_button" style="width: 100px;">
<asp:Button ID="btnCancelComment" runat="server" CausesValidation="False" Width="100px"
Text="OK" PostBackUrl="ValidationDOC.aspx" />
</div>
</td>
</tr>
</table>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="mpeDemandeAvalider" runat="server" TargetControlID="btnHiddenComment"
PopupControlID="pnlDemandeAvalider" CancelControlID="Button1" OkControlID="btnHiddenComment"
BackgroundCssClass="modalBackground" PopupDragHandleControlID="Panel1"
Drag="True" DynamicServicePath="" Enabled="True">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel ID="pnlDemandeAvalider" runat="server" Style="display: none; background-color: #f5f5f5;
border: solid 3px #B8B8B8;">
<asp:Panel ID="Panel1" runat="server" Style="padding-bottom: 10px; cursor: move;
height: 30px;">
<table class="content_titre" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<asp:Label ID="Label3" runat="server"></asp:Label>
</td>
</tr>
</table>
</asp:Panel>
<table class="modalComment" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" style="height: 80px;" align="center" valign="top">
<table>
<tr>
<td>
&nbsp;&nbsp;&nbsp;
</td>
<td>

</td>
</tr>
<tr>
<td style="height: 27px">
&nbsp;&nbsp;&nbsp;<img alt="" src="../../Ressources/images/navig/puce-blue.gif" /><span
style="color: #133880; font-size: 11px;"> Statut :</span>
</td>
<td height="27px" align="left">
<asp:DropDownList ID="DDLstatutPopup" runat="server" AppendDataBoundItems="True">
<asp:ListItem Value="-1">.:: Veuillez sélectionner une action de validation ::.</asp:ListItem>
</asp:DropDownList>

</td>
</tr>
<tr>
<td style="height: 27px">
&nbsp;&nbsp;&nbsp;<img alt="" src="../../Ressources/images/navig/puce-blue.gif" /><span
style="color: #133880; font-size: 11px;"> Motif :</span>
</td>
<td height="27px">
<asp:TextBox ID="txtPopUpMotif" runat="server" TextMode="MultiLine" Width="730px"
Height="64px"></asp:TextBox>
</td>
</tr>
</table>
</td>
</tr>
<tr align="center">

<asp:Button ID="Button2" runat="server" Style="display: none" />
<asp:Button ID="Button3" runat="server" Style="display: none" />

<td align="center">
<div class="login_button" style="width: 100px;">
<asp:Button ID="btnPopUpOK" runat="server" CausesValidation="False" Width="100px"
Text="OK" OnClick="OnValidateMulti" PostBackUrl="ValidationDOC.aspx" />
</div>
</td>
<td align="center">
<div class="login_button" style="width: 100px;">
<asp:Button ID="btnPopUpAnnuler" runat="server" CausesValidation="False" Width="100px"
Text="Annuler" OnClick="OnCancel" />
</div>
</td>
</tr>
</table>
</asp:Panel>

有什么建议。?

最佳答案

我认为您的问题 BehaviorID .

对于两者 ModalPopupExtender您应该分配唯一的 BehaviorID . BehaviorID多个 ModalPopupExtender 必须不同

希望对你有帮助。

关于asp.net - 如何在同一页面中显示两个模态弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6328134/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com