views:

531

answers:

2

Hi I have a Repeater and I am doing various things during the ItemDataBound event. My Repeater is in a control. What I am noticing is that the things that are supposed to happen in the ItemDataBound event happen after the Page_Load of the page hosting the control. Is there a way to use some sort of ItemDataBoundComplete trigger so I can do other things on my page after the events of the ItemDataBound have taken place? Thanks, please let me know if I have not been clear.

[Edit] I have controls that are being bound to the ItemDataBound and they are not available until after the Page_Load for the page hosting the control.

[Solution] (In my case):

In my page I used the following: Control.Page.LoadComplete += new EventHandler(Control_LoadComplete);

Then I performed what I had to do in that event.

A: 

What kind of things? You can override the OnPreRenderComplete method, which is called immediately before the page renders.

John Saunders
A: 

You can also change to a ListView, which is support as much flexibility in the html, and use the DataBound event (which is called after the whole ListView has finished data binding).

eglasius