I have two modal popup extenders inside an update panel. Problem is when I call the show method of any modal popup both popups are shown.
Please let me know how can we solve this? thanks in advance.
I have two modal popup extenders inside an update panel. Problem is when I call the show method of any modal popup both popups are shown.
Please let me know how can we solve this? thanks in advance.
My guess without seeing any code is you have them bound to the same control.
<asp:button id="SAME_ID" runat="server" />
<ajaxtoolkit:modalpopupextender
id="ModalPopupExtender"
runat="server"
targetcontrolid="SAME_ID">
</ajaxtoolkit:modalpopupextender>
<ajaxtoolkit:modalpopupextender
id="ModalPopupExtender2"
runat="server"
targetcontrolid="SAME_ID">
</ajaxtoolkit:modalpopupextender>
Do you need multiple MPEs? If you are trying to show different forms based on user interaction or data state, consider moving the update panel inside the boundaries of a single MPE and then show/hide Placeholders (or Panels) that contain content block.
MPEs are very heavy client side and putting them inside an update panel ensures that you are going to send a lot of code & markup down the wire when the update panel updates. MPEs are also pretty fragile and I wouldn't be surprised if they don't function well with the ground moving beneath them (like when an update panel updates). They do however react reasonably well to their inner content changing. If the content blocks are different sizes you might have issues with the background and shadowing but those are configurable.
You should also consider moving to jquery dialogs instead of MPEs. They are much cleaner, more robust, easier to deal with, far more flexible, and only loose a couple features like easy code behind access to events but that is a worthwhile trade off.