具有多个回发的ModalPopupExtender [英] ModalPopupExtender with multiple postbacks
本文介绍了具有多个回发的ModalPopupExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用ModalPoupExtender时遇到麻烦.它包含几个下拉列表.第二个ddl将根据第一个ddl的选择进行填充.但是要做到这一点,我需要执行回发.当我执行Modal Popup时,要么消失,要么在屏幕的左下角进行渲染,我似乎无法填充它.我已经搜寻并寻找一种补救措施,但是还没有碰到任何运气.我可以帮忙.
I am having trouble with the ModalPoupExtender. It contains several Dropdown List. the Second ddl is populated based on the selection of the first. but to do this I need to perform a postback. When i do the Modal Popup either disapears or renders in the lower left hand corner of the screen and I cannot seem to get it to populate. I have searched and searched for a remedy but have not came up with any luck. I could use some help please.
<asp:Panel ID="pnlVendorSytlyPopUp" runat="server" CssClass="modalPopup" style="display:none;">
<asp:Panel ID="pnlDragHandle1" runat="server" CssClass="dragPanel"><div style="display:inline; removed5; removed5; float:right; width:400px;">Classification Specs and Data
<div style="float:right;removed:pointer; "><!--[if IE 7]><div style="removed:absolute; removed5; removed5;"><![endif]-->
<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/Images/Site/btnClose.png" CausesValidation="false" /><!--[if IE 7]></div><![endif]--></div></div>
<ajaxToolkit:UpdatePanel ID="UpdatePnlCat" runat="server" UpdateMode="Conditional">
<contenttemplate>
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td align="left">Top Category</td>
<td align="left">
<asp:DropDownList ID="ddlTopCat" runat="server" AutoPostBack="true" CausesValidation="false"
onselectedindexchanged="ddlTopCat_SelectedIndexChanged">
<asp:ListItem Text="Adult" />
<asp:ListItem Text="Kids" />
<asp:ListItem Text="Bedding" />
</td>
</tr>
<tr>
<td align="left">Category</td>
<td align="left">
<asp:DropDownList ID="ddlCat" runat="server">
</td>
</tr>
</table></contenttemplate>
<asp:Button ID="btnHiddenValue1" runat="server" Text="Button" Style="display:none;" />
<cc1:ModalPopupExtender ID="popupVendorStyle" runat="server" TargetControlID="btnHiddenValue1" BackgroundCssClass="modalBackground" PopupControlID="pnlVendorSytlyPopUp" CancelControlID="ImageButton5" OkControlID="Button2" PopupDragHandleControlID="pnlDragHandle1" DropShadow="true">
所有这些都放在另一个更新面板中.
all this sits in another update panel.
推荐答案
我终于使它起作用了.
vendorStylePopup面板位于更新面板中.我必须添加ChildrenAsTriggers ="false"和updatePanel作为下拉列表ChildrenAsTriggers ="true"
I finnally got this to work.
The vendorStylePopup Panel sits in an update panel. I had to add ChildrenAsTriggers="false" and the updatePanel for the dropdown list ChildrenAsTriggers="true"
这篇关于具有多个回发的ModalPopupExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文