I want to create a Repeater that displays the header/footer based on properties, only if the DataSource
is empty.
public class Repeater : System.Web
If you want to do this with just a repeater you can do this:
HEADER STUFF
ITEM STUFF
FOOTER STUFF
and then in your code behind
protected void ShowHideHeaderFooter(object sender, RepeaterItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Header && theDataSource.Count == 0 && !ShowHeaderOnEmpty)
{
e.Item.FindControl("PlaceHolderHeader").Visible = false;
}
...
}