To explain briefly I have a MasterPage with an UpdatePanel on it which then contains User Controls. On the user control I have a ModalPopupExtender with an UpdatePanel inside its PopupControlID which is a Panel. My MPE doesn't have Ok or Cancel buttons. I just placed a button inside the Panel which triggers the postback and on the code just hides the MPE via <mpe_name>.hide().
This works fine after clicking the button. The MPE becomes hidden, but the problem lies when I trigger anything on the MasterPage's UpdatePanel; the MPE becomes visible and somewhat broken because it's not modal anymore and it just shows the unneeded div at the lower left of the page.
Have anyone experienced this before? Thanks in advance.
Submitted via EggHeadCafe - Software Developer Portal of Choice
5 SQL Server Management Studio Tips
http://www.eggheadcafe.com/tutorials/aspnet/b039a933-1815-4c21-bc5d-e5f4cd421c5d/5-sql-server-management-s.aspx
I think could have something to do with upgrading to Dot Net 3.5
framework.
Has anyboby came acorss a work around for this bug in the framework?
The workaround to solve this issue is described in following steps :
- Take two panel, one outer panel and another inner panel.
- Set the PopupControlId property of the ModalPopupExtender to the outer
panel's Id.
- Set the TargetControlId property of the RoundedCornerExtender to the inner
panel's Id.
- Make the Backcolor property of the outer panel as - Transparent.
The following code snippet describes how to use a ModalPopupExtender with a
RoundedCornerExtender :
<asp:Button ID="btnClick" runat="server" Text="Click"></asp:Button>
<asp:Panel ID="pnlOuter" runat="server" BackColor="Transparent"
style="display:none;">
<asp:Panel ID="pnlInner" runat="server" BackColor="white" Width="310px">
<table style="width: 100%" >
<tr>
<td>
<asp:Label ID="lblText" runat="server" Text="Hello World!
"></asp:Label>
<asp:Button ID="btnOk" runat="server" Text="Ok" />
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtender1"
runat="server"
TargetControlID="btnClick"
PopupControlID="pnlOuter"
CancelControlID="btnOk"
BackgroundCssClass="modalPopupBackgroundStyle"
Enabled="True">
</cc1:ModalPopupExtender>
<cc1:RoundedCornersExtender ID="RoundedCornersExtender1"
runat="server"
TargetControlID="pnlInner"
BorderColor="black"
Radius="6"
Corners="All">
</cc1:RoundedCornersExtender>
Hope you find it useful.
The problem relates to ModalPopupExtender being used within an
UpdatePanel.
Any help on this matter is needed urgently, or I will need to redesign
this part of the web app to not use the modal popup.
Frank
"Joe" wrote:
> .
>