User Control Loads many Times

Posted by Community Admin on 04-Aug-2018 08:08

User Control Loads many Times

All Replies

Posted by Community Admin on 20-Jul-2011 00:00

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?

Posted by Community Admin on 22-Jul-2011 00:00

Anyone plz?

Posted by Community Admin on 25-Jul-2011 00:00

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

Posted by Community Admin on 28-Jan-2012 00:00

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

Posted by Community Admin on 29-Jan-2012 00:00

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



This thread is closed