rad window and master page

2 posts, 0 answers
  1. Tzach Kaufmann
    Tzach Kaufmann avatar
    95 posts
    Member since:
    Aug 2008

    Posted 14 Jan 2015 Link to this post


    I have an asp.net application that contains a Main.Master page.
    I initialize a timer on the Main.Master page in order to detect session timeout before it happens and display a message to the user.
    When a user opens a RadWindow, another instance of the Main.Master is created and another timer is added to the page.

  2. Marin Bratanov
    Marin Bratanov avatar
    3565 posts

    Posted 15 Jan 2015 Link to this post

    Hello Tzach,

    Since the content page of the RadWindow uses the same master page, it creates all controls from it and runs all code from it, so having another timer is expected. In this regard, you can consider the RadWindow to be a simple iframe that holds the content page.

    What I can suggest is adding some checks in your timer code, for example, the JavaScript code can check whether it is the topmost frame (see the Determine If A Page Is Loaded Inside A RadWindow article). On the server you can create a flag in a Session variable when the user first creates the session and check for that in order to enable/disable the timer.

    This is not affected by our controls in any way and these ideas are merely suggestions, as I cannot determine the best approach to handle this in the concrete case, only the developer(s) working on the project can.


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top