Multiple Usercontrol in a page RRS feed

  • Question

  • User-1208318505 posted


    I have a page in a structure as follows. But the loading time of the page is takes 20 or more seconds. In usercontrols i'd used Telerik RadControls, for that reason i can't use updatepanel to avoid script problems or etc. I had tried to add usercontrols dynamically but there is about 14 usercontrols and it takes the same time period :(. I had tried using PartialUpdatePanel as in http://www.codeproject.com/KB/ajax/PartialUpdatePanel.aspx but it's not compatible with telerik controls. My client wants to have the all 14 usercontrols being in the same page (not divided by tabs or wizards)

    Need urgent advices... 

    Structure :



    14 Usercontrols that contains RadListViews has couple postback events.


    Monday, January 24, 2011 6:34 AM


All replies

  • User160688232 posted


    You can overcome this problem using jquery. Load a page with out calling usercontrols on page_load method. Using jquery ajax call call a method in code behind n call user controls dynamically.

    It will hit after page load completes.here method name is where u calling user controls dynamically. So you can decrease the page load time.















    Tuesday, January 25, 2011 7:49 AM
  • User-104483789 posted

    The question is how those initial 20 seconds get spent. You should start profiling your page with tools like IE9 developer toolbar (or Firefox -> Firebug / Chrome -> CTRL + shift + I) and find out where you can improve the most:

    - PageSize: make sure IIS HTTP dynamic compression is enabled to reduce total bytes sent over the wire
    - Number of external resources referenced in your page (consider compressing and minifying JS and CSS files -> search for ASP.NET js minifier)
    - ViewState: I imagine those 14 usercontrols can generate a lot of viewstate. This data will be posted back to the server on every postback. Disable viewstate on controls where possible. Another way to reduce viewState is to compress it when sent to the client and decompress it on a postback (A number of articles on the internet explain exactly how to do this, search for "viewstate compression").

    Remark: compressing your viewState makes sense, even if you apply HTTP compression on the server, because your browser decompresses your HTML on the client. At that point, the client has to push back the fully sized viewstate to the server.

    - What database traffic do you generate when databinding these usercontrols? There's a range of measures you can take there: apply caching to reference data, retrieve multiple recordsets in a single DB connection, perform your initial DB retrieval asynchronously.

    This is a just a handful of tips to start with.



    Tuesday, January 25, 2011 6:26 PM
  • User-1208318505 posted

    @dbevernage : The 20 seconds became for the reason of reading 33 tables from the database for a client and being have to keep the data in the viewstate. I had already activate HTTP Compression. There are some external resources of the component (Telerik RadControls) and can't reduce the external sources (removed any unnecessary components and used html tags). 

    @kittusra : i'll give a try tonight and will share the result at here... 

    Thanks for advices 


    Thursday, January 27, 2011 6:44 AM
  • User-1208318505 posted

    @kittusra: i had tried but no success. Cause when i add the user control by using jquery. it asks for scriptmanager and other global components of telerik radcontrols. 

    I had added timer to all usercontrols. and bind the data after all page load events completed. 

    Friday, January 28, 2011 2:28 AM
  • User2019981500 posted


    What ever ? this is going to happen because it is too much.So you can have simple go for asynchronous loading

    I hope this article will help you

    Load and Display Page Contents Asynchronously with Full Postback ...

    Apart,You can Think of having progressbar during page rendring



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, January 28, 2011 2:58 AM