Last post Nov 13, 2017 08:12 AM by zxj
Nov 10, 2017 10:19 AM|Panther59|LINK
In my application, we are using repeater control to generate list of user control based on the data bounded to repeater control. However in my case there is lot of code present within the prerender of user control which taking lot of time. Due to this loading
of entire page is very slow, since prerender of each user control is executed in the seqential manner.
<asp:Repeater ID="rptInvoices" runat="server" EnableViewState="false" OnItemDataBound="rptInvoices_ItemDataBound">
<ta:termlookuplabel runat="server" text="<%$Resources:InvoicesLabel %>" />
<table width="100%" cellpadding="0" cellspacing="0">
<a name='<%# DataBinder.Eval(Container.DataItem, "RecordId") %>'></a>
<TAUC:RecordSummaryControl ID="ucHandoffRecordSummaryControl" runat="server" customcontrolarea-width="85"
My question is that, can we execute the Prerender of the all user control in parallel so that it helps loading page faster?
Nov 13, 2017 08:12 AM|zxj|LINK
ASP.NET server controls have their own life cycle that is similar to the page life cycle.
The rendering of ASP.NET sever controls depend on the order in which they are rendered and on the position on the control tree.
When all controls are loaded, the HTML stream is passed to the client.
The point is not how to load user control in parallel, but how to get all data in parallel.
Because that doesn't prevent the loading of all data sources in parallel before the rendering.
If you must use User controls, please see
Using the ASP.NET UpdatePanel Control with User Controls.