I'm currently building a user control that displays a message when a Repeater is empty.
The idea is simple, provide the user control with the ID of the Repeater. When the user control is rendered look up the Repeater and check Items.Count
. If it's zero then display the message.
I would like to add one more feature though. I want to be able to hide the Repeater if there are no Items.
Obviously I can't do this in protected override void Render(HtmlTextWriter writer)
because the Repeater has (possibly) already been rendered. I also can't do this when the the Repeater ID is assigned to the user control, as the databinding hasn't happened yet.
So my question is.. what event can I override in my user control where databinding has occurred, but rendering has not.