Asp.net Repeaters Life Cycle

736 views Asked by At

This is my Scenario.

I have 4 repeaters. 3 - nested and 1 completely outside.

<asp:Repeater1 
    <asp:Repeater2 
         <asp:Repeater3


<asp:Repeater4

i now have a List<string> lstSelectedValues

i am doing various Calcuations in Repeater 2 and 3 and building the lstSelectedValues at various places. Finally i have a list of strings that i need as a data source to repeater 4.

Now my question is, Where do i bind this? If i do in the page load like

Reapter1.datasource = something 
          (inside the item databound R-2 is called and R-3 inside R-2)

Repeater.datasouce = lstSelectedValues

This wont work because at this point lstSelectedValues is empty. if i do it in itemDatabound or R1/R2/R3 it is getting added multiple times. i Tried inthe R3_Unload event . But that is also not working. Any pointers would be of great help.

1

There are 1 answers

0
Markus On

The PreRender or the PreRenderComplete events are the last events that are called before the page is rendered. The data should be ready for binding then.