Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ModalPopupExtender hide problems

1 view
Skip to first unread message

kyleuy

unread,
Jan 18, 2010, 12:46:03 AM1/18/10
to
Hi,

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

Joe

unread,
Jan 26, 2010, 8:37:29 AM1/26/10
to
I am having the exact same problem as the above message.

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?

elizas

unread,
Jan 27, 2010, 3:11:23 AM1/27/10
to
Hi,
i have experience in Workaround for Modal Popup with RoundedCornerExtender
Applying rounded corner to modal popup panel may look nice on the UI but it
also causes issues such as the content of he panel is lost even if we can see
a modal popup panel with rounded corners.

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.

Joe

unread,
Jan 27, 2010, 8:15:38 AM1/27/10
to
I think you misunderstood our problem Eliza.

The problem relates to ModalPopupExtender being used within an
UpdatePanel.

Joe

unread,
Jan 27, 2010, 9:07:44 AM1/27/10
to
I think I should make it clear that I did not have this problem when I
was running this on dot Net 2.0. But its not possible for me to back
track to 2.0 as my customers use 3.5.

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

unread,
Feb 18, 2010, 11:25:01 PM2/18/10
to
Did you ever find anything on this? I'm running into the same problem, but
only when the page is loaded with a QueryString.

Frank

"Joe" wrote:

> .
>

0 new messages