I have a module I developed for DNN which uses the modalpopupextender control. The modal dialog contains the DNN URLControl (the user control that lets you select files or upload new files to your site. I modified the URL control so that when you select a folder or a file, an event is raised. I did this because I needed fields to autofill with whatever file name the user selects.
Because I have these event handlers that I added to the URL control, whenever a selectedindexchanged event fires off within my modal dialog, the entire screen "refreshes" even though asp.net ajax is enabled. I have it setup so there's a dark background against the diaog box, so it looks like the whole page flashes when it refreshes. It's not a showstopper, but it is annoying. I thought using update panels and ajax controls were supposed to prevent entire pages from looking like they are refreshing. Here's the sequence of events:
1. user clicks on cmdAddDocument, and the modal dialog pops up
2. user selects a folder or file from the drop down menu from the URL control
3. selectedindexchanged event fires from within the URL control. This causes the entire modal dialog (along with the modal background) to disappear then reappear again quickly. If I didn't force the modal popup to show again, it would've just disappeared altogether.
And here is the code that contains the modal dialog control:
<asp:updatepanel id="upDocuments" runat="server" updatemode="conditional" enableview_state="true">
<contenttemplate>
<ajaxtoolkit:modalpopupextender
id="popupDocuments"
runat="server"
popupcontrolid="pnlAddDocument"
targetcontrolid="cmdDummyAddDocument"
backgroundcssclass="modalBackground" />
<asp:linkbutton id="cmdDummyAddDocument" runat="server" style="display:none" />
<asp:linkbutton id="cmdAddDocument" runat="server" text="Add Document..." cssclass="CommandButton" />
<asp:panel id="pnlAddDocument" runat="server" style="display:none;" cssclass="documentDialog">
<h3><asp:label id="lblHeaderText" runat="server" /></h3>
<table class="documents">
<tr>
<td class="label">Title:</td>
<td>
<asp:textbox id="txtTitle" runat="server" />
<asp:label id="lblRequiredTitle" runat="server" cssclass="errorMessage" />
</td>
</tr>
<tr>
<td class="label">Categeory:</td>
<td><asp:textbox id="txtCategory" runat="server" /></td>
</tr>
</table>
<portal:url id="ctlFile" runat="server" width="250" showtabs="False" urltype="F" shownewwindow="True" />
<div class="buttonContainer">
<asp:linkbutton id="cmdUpdate" runat="server" text="Add" cssclass="CommandButton" />
<asp:linkbutton id="cmdDelete" runat="server" text="Delete" cssclass="CommandButton" visible="false" />
<asp:linkbutton id="cmdCancel" runat="server" onclick="cmdCancel_Click" cssclass="CommandButton" text="Cancel" />
</div>
</asp:panel>
</contenttemplate>
</asp:updatepanel>
It's hard to explain exactly what's going on, but I don't knowwhere else to look for help. I think the DNN URL control is causing the refresh to happen, but I don't know how to stop it without disabling event handlers within that control. If there is any other information anyone needs to see to diagnose the issue, I will be happy to post it.