More in this section
Forums / Bugs & Issues / User Control Loads many Times

User Control Loads many Times

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. waqar
    waqar avatar
    76 posts
    Registered:
    28 Mar 2011
    20 Jul 2011
    Link to this post
    Hi !

    I am using a control and on its page load event I am performing some task. But When I debug and analyse it then I found some drastic performance issue.
     
    Control is on Mater page. When I load home page inherited from master page then controls load once so far so good, but when I go to some inner page then control loads many times. e.g link below cause control to loads 4 times because the url having 4 levels(/).

    http://192.168.1.50:1377/personalbanking/accounts/currentaccount/index


    Can you tell me why is it happening ? Any workaround?
  2. waqar
    waqar avatar
    76 posts
    Registered:
    28 Mar 2011
    22 Jul 2011
    Link to this post
    Anyone plz?
  3. Bonny
    Bonny avatar
    58 posts
    Registered:
    11 Nov 2016
    25 Jul 2011
    Link to this post
    Hello Waqar,

    I tried to reproduce your problem, but I couldn't. I created master page with custom control on it, then created a page ( named "page" ), based on this master page. I made this page to not be homepage. Then I created 3 parent pages for this page in hierarchy. When I loaded the "page" named page, the control's Page_Load was called only 1 time.
    Can you give me some specific instructions how to reproduce this, or send me your DB, config files and any custom data that I need.

    Regards,
    Bonny
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Doug Lubey
    Doug Lubey avatar
    31 posts
    Registered:
    17 Apr 2010
    28 Jan 2012
    Link to this post
    I am having the same issue;  When I run my control in a standard aspx page.  The control is called 1x(life cycle).  While I am in Sitefity 4.x; the control is called 4x exactly.  So any variables I set during the original page are load are reset during each load. 

    Has anybody else had this problem;  You can not see it unless you run the sitefinity site in debug mode. 

    -doug lubey of louisiana


    Search engine reference:
    sitefinity control is called multiple times during pageload

  5. Doug Lubey
    Doug Lubey avatar
    31 posts
    Registered:
    17 Apr 2010
    29 Jan 2012
    Link to this post
    I found out why this occurs inside my code:  I use a RE-ROUTING TECHNIQUE (or really a url interception) to route my page to the proper telerik virtual path. 

    THE CMS wanted to reload the page for every js file;

    Please see this url for more information:
    =======================================
    OK found a bug in the above code: The Page_load event would execute multiple times. Why; becuase every js and css file which was used on the master page was considered in the process. So for a given page; this means if thier is 10 js files; this code would be called 11x times. LIKE I SAID ABOVE; TELERIK WOULD BE NICE IF THEY CHIMED IN AND TOLD US HOW TO REALLY DO RE-ROUTING INSIDE THEIR FRAMEWORK.

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/question-how-to-integrate-url-rerouting-with-sitefinity-virtual-folder-structure-version-4-3-1885-0.aspx



5 posts, 0 answered