PageViews' ContentURL Not Loading Correctly

4 posts, 0 answers
  1. T.J.
    T.J. avatar
    11 posts
    Member since:
    Apr 2013

    Posted 21 Jan 2014 Link to this post

    Hello,

    I have a fairly difficult situation. Let me start by saying that I am very familiar with the ASP.NET AJAX RadControls, particularly RadTabStrip & RadMultiPage. I have already used these controls successfully in several different scenarios.

    Now, for the situation. I have a primary page with a RadTabStrip at the top and a RadMultiPage filling the rest of the page. When the primary page loads, I create all the tabs and their associated PageViews. Each PageView has a ContentURL value assigned. So far so good.

    Where it gets tricky is that each ContentURL value is for a page with a Frameset containing 3 iFrames. This allows us to reuse a single Search Results page throughout the site, by loading the Search Results page with a different module (specified by URL parameter) into one of the Frames of each page's Frameset. It's somewhat inefficient, but it works for now and we are in the process of redoing these pages.

    The problem doesn't come up immediately. The 1st PageView loads its ContentURL page correctly, so I click a tab to load a 2nd PageView and that one loads correctly too. Clicking the tab associated with the 1st PageView in order to go back works fine as well.

    So at this point, I click another tab to load a 3rd PageView's ContentURL page. For this 3rd PageView, 2 of the 3 iFrames in the FrameSet page load their content correctly, but the 3rd iFrame (Search Results page with 3rd PageView's module) does not load. So I click the tab to go back to the 1st PageView, and I see that the iFrame content that did not load (Search Results page with 3rd PageView's module) has been loaded into the corresponding iFrame of the Frameset on this 1st PageView.

    This is absolutely bizarre and I am confounded. This method has worked for us for a long time, only we used hyperlinks with an iFrame target instead of a RadTabStrip and an iFrame instead of a RadMultiPage. However, this method did not allow pages to persist when switching between tabs. We are not looking to change the structure of our application--I just need all pages to load correctly, as they are written.

    Since each of the pages with a Frameset are essentially copies of each other (just with different sources set for each iFrame), I think that maybe the RadMultiPage is getting mixed up and it's loading one iFrame's content from one page into the iFrame of another page, because both iFrames share the same Control ID & URL, just with different URL parameters (modules) specified. Everything works fine until too many PageViews' content is loaded, and then iFrames' content gets crossed between different Frameset pages.

    The simplest solution would be to have the PageViews refresh their content each time they load, rather than having the ViewState persist between clicking other tabs. However, I'd prefer to have the ViewState persist between pages if possible, since if the PageViews refresh each time they load, it's really no better than the current way we are doing it.

    Any assistance would be appreciated! Thanks!
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 24 Jan 2014 Link to this post

    Hello TJ,

    As your scenario is quite a custom one, we would need to inspect your implementation and replicate the issue locally in order to efficiently assist you. Could you isolate the problem with some dummy data and provide us with it? In addition, please specify if you are setting the ContentURL at client or at server side. Since you mentioned "I think that maybe the RadMultiPage is getting mixed up and it's loading one iFrame's content from one page into the iFrame of another page", I would suggest you to try setting the contentUrl at the TabSelected at client-side or at server side.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. T.J.
    T.J. avatar
    11 posts
    Member since:
    Apr 2013

    Posted 27 Jan 2014 in reply to Nencho Link to this post

    Thanks for the reply, Nencho!

    To answer your question, I am creating the PageViews and setting their contentURL values server-side at the initial page load. Since this primary page needs to be static, the idea is to avoid postbacks, so this seemed like the best option. However, I will try your suggestion to use the TabSelected client-side event to set the PageView's contentURL values.

    If this doesn't work for me, then I'll put together a demo to illustrate this issue for you to review.
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 30 Jan 2014 Link to this post

    Hello TJ,

    Please take your time and let us know once you have further information.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top