Issue Changing Gallery Folder Multiple Times

  •  01-16-2013, 4:43 PM

    Issue Changing Gallery Folder Multiple Times

    I am having an issue when rendering the image gallery multiple times with different GalleryFolders.  I have implemented the gallery inside an AJAX ModalPopupExtender on my master page.  From another page, the user clicks a link to display a particular gallery.  In the code behind on the master page I change the GalleryFolder property, and render the modal popup.  This code works fine on my local machine for an unlimited number of times.  However, when deployed on an IIS 7.0 server running .NET Runtime 4.0 the gallery stops working after the user clicks the 5th gallery link.  It displays but is empty of any images.  A few additional details:

     

    1.  The ModalPopupExtender works fine for an unlimited number of times when the Image Gallery is not included in the popup.

    2.  The ModelPopupExtender works fine for an unlimited number of times when the popup contains a YouTube video embedded as an iFrame

    Based on this, I don't believe the Modal Popup to be an issue

     

    I have implented the Image Gallery three different ways :

    a)  Directly inside a ModalPopupExtender panel as described above

    b)  As an iFrame inside the ModalPopupExtender, with a URL to another page that contains only the Image Gallery control

    c)   Using window.open() to open another page that contains only the ImageGallery control

    The same behavior exists in all three implementations.  The fact that it occurrs in options b and c really puzzles me, since it's a brand new page being loaded each time.

     

    Finally, if the same Image Gallery is rendered with the same GalleryFolder it will work an unlimited number of times.  The problem only occurrs if the gallery folder is changed.  If I refresh the page, it starts working again but will again stop after the GalleryFolder is changed 4 times.

     

    Screenshots of my client and server side code below.  Any ideas? 

     

    <asp:ModalPopupExtender ID="mpeGallery" runat="server" PopupControlID="panGallery"
                            TargetControlID="hidBtnGalleryTarget" BackgroundCssClass="modalBackground" CancelControlID="imgGalleryClose">
                        </asp:ModalPopupExtender>
                        <asp:Panel ID="panGallery" runat="server" CssClass="modalPopup" >
                            <asp:Panel ID="Panel2" runat="server" HorizontalAlign="right" BackColor="#474547">
                                <asp:ImageButton ID="imgGalleryClose" runat="server" ImageUrl="~/Images/close.png"
                                    Style="background-color: White;" OnClientClick="scrollToAnchor();" />
                            </asp:Panel>
                            <DotNetGallery:GalleryBrowser ID="imgGallery" runat="server" GalleryFolder="" Layout="Slideshow"
                                Width="900" Height="500" AllowPostComment="false" AllowShowComment="false" AllowEdit="false" />
                        <iframe id="ifrmMasterTour" class="youtube-player" type="text/html" runat="server"
                        width="800" height="450" src="" frameborder="0" visible="false" wmode="opaque"></iframe>
                        </asp:Panel>
     

     

        Protected Sub btnShowGallery_Click(sender As Object, e As System.EventArgs) Handles btnShowGallery.Click
            With Me.imgGallery
                .GalleryFolder = TTPSettings.ImageGalleryPath & Me.hidGalleryFolder.Value
                .Visible = True
                .Enabled = True
            End With


            With Me.ifrmMasterTour
                .Visible = False
                .Attributes.Add("src", "")
            End With


            Me.mpeGallery.Show()
        End Sub
     

     

     

    Filed under: ,
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems