.NET Framework - ModalPopupExtender hide problems
Asked By Kyle Uy
18-Jan-10 12:46 AM
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.
PopupControlID
(1)
Popup
(1)
ModalPopupExtender
(1)
TargetControlId
(1)
UpdatePanel
(1)
MasterPage
(1)
Backcolor
(1)
Iwas
(1)
Joe replied to Kyle Uy
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 replied to Kyle Uy

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 :
style="display:none;">
runat="server"
TargetControlID="btnClick"
PopupControlID="pnlOuter"
CancelControlID="btnOk"
BackgroundCssClass="modalPopupBackgroundStyle"
Enabled="True">
runat="server"
TargetControlID="pnlInner"
BorderColor="black"
Radius="6"
Corners="All">
Hope you find it useful.
Joe replied to elizas
I think you misunderstood our problem Eliza.
The problem relates to ModalPopupExtender being used within an
UpdatePanel.
Joe replied to Joe
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 replied to Joe
Did you ever find anything on this? I am running into the same problem, but
only when the page is loaded with a QueryString.
Frank
Cause UpdatePanel to refresh on popup window close .NET Framework Hi, Ok, I have a page with an updatepanel, which can open a popup. The popup can change an object's values which is stored in the session, this object is displayed on the main window. I'd like to have the updatepanel update when the popup is closed. I cannot do the update call after window.open, because that returns immediately (before the user could possibly edit the settings in the popup). I tired having a javascript page level variable to store the popup and set its
Problema con passaggio dei valori in un PopUp .NET Framework salve, ho un problema nel passaggio dei valori tra un PopUp e l'altro per specificare meglio Ho una pagina A che apre Un popup B che a sua volta tramite questo script in VB apre un PopUp C Me.txtDataInvio.Attributes.Add("ONCLICK", "window.open('calendario.aspx', '', 'width = 180, height = 160, left 180, resizable = no, menubar = yes, toolbar = no, scrollbars = no, locations = no, status = no');") Quindi il popup B tramite il click su di un textbox mi apre il popup C che contiene un calender Sul popup c quando clicco su un giorna del calendario vorrei che: 1) Il popup C si chiudesse 2) il mio textbox contenuto nella pagina popup B si valorizzasse con
and deployed, and what browser the users are using, this is likely to trigger the popup blocker. Also, there has been instances of the child window losing contact with the main in some cases, even creating a new Session. Instead, I'd use the AJAX modal popup extender: http: / / www.google.co.uk / search?aq = 0&oq = AJAX+moda&sourceid = chrome&ie = UTF-8&q = ajax+modal+popup That would mean that you would not need to pass anything anywhere, as the modal popup would have access to the entire page anyway, so anything it needed to know it unnecessary. . .? Only that you will have to wire up the commandfield to pop the modal popup rather than the GridView's SelectedIndexChanged event. Other than that, there is no difference. . . - - Mark they are familiar with). Will need to highlight the row when selected and work the modalpopupextender for the details of the record (not just what is in the row). Will this another unnecessary column. . . I would think so. Assuming the whole thing is inside an AJAX UpdatePanel, you would just need to wire up the ButtonField's OnClick event to show the modal popup. . . - - Mark Rae ASP.NET MVP http: / / www.markrae.net Space gained from the column that
for the record. It is all working. The linkbutton opens a showModalDialog rather then the modalpopupextender. function ShowChangeRequestDetail(ChangeRequestID) { window.showModalDialog("ProteusListDetailView.aspx?ChangeRequestID = " + ChangeRequestID, "", scrollbars:no"); } As mentioned, it all links are welcomed. Thanks. . . John ASP.NET Discussions ASP.NET (1) ShowChangeRequestDetail (1) ChangeRequestID (1) PopupControlID (1) ShowModalDialog (1) UpdatePanel (1) DialogHeight (1) DialogWidth (1) But in IE only! showModalDialog is *COMPLETELY* non-standard and co.uk / search?sourceid = chrome&ie = UTF-8&q = showModalDialog+cross+browser The AJAX modal popup extender is designed specifically to get round this problem. . . - - Mark Rae ASP.NET MVP http www.markrae.net I guess what I did is a no-no. I tried the modalpopupextender but could not get it to work properly. Saw there was a function in one which I probably will be doing) what suggestions do you have? Use the AJAX modal popup extender. - - Mark Rae ASP.NET MVP http: / / www.markrae.net Thanks for those 6 words of wisdom. Ok. I started moving to the modalpopupextender. Now, there is a linkbutton in the gridview that is to be used to open I have been working on this most of the day reverting back to using the modalpopupextender and I am not having any luck or success in getting this to work properly
AJAX Asyncfileupload - how to refresh updatepanel after UploadedComplete .NET Framework I am using the latest AJAX control toolkit (4.1.51116.0). I have a modalpopupextender, AsyncFileUpload and a gridview inside an update panel in my web user control (.ascx) page . The modal popup extender appears and after the upload I want to update the gridview to display some ImportSubstrates.ascx.vb" Inherits = 3D"ImportSubstrates" %> Namespace = 3D"AjaxControlToolkit" TagPrefix = 3D"asp" %> BehaviorID = 3D"behidImp" TargetControlID = 3D"Button2" PopupControlID = 3D"pnlImportSubstrates" CancelControlID = 3D"btnImpDone" BackgroundCssClass = 3D"modalBackground" / > runat = 3D"server" CssClass = 3D"modalPopup" Width ForeColor = 3D"#284775" / > Width = 3D"50px" ValidationGroup = 3D"import" / > keywords: AJAX, Asyncfileupload, -, how, to, refresh, updatepanel, after, UploadedComplete description: I am using the latest AJAX control toolkit (4.1.51116.0). I have a modalpopupextender, AsyncFileUpload and a gridview inside an update panel in my web us