How can I create a custom Repeater that displays Header, Footer based on properties?
问题 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.UI.WebControls.Repeater { public bool ShowHeaderOnEmpty { get; set; } public bool ShowFooterOnEmpty { get; set; } [DefaultValue((string)null), PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(System.Web.UI.WebControls.RepeaterItem)), Browsable(false)] public ITemplate EmptyTemplate { get; set; } } I also want to create a