ASP.NET Custom Repeater Control with EmptyTemplate, ShowHeaderWhenEmpty,ShowFooterWhenEmpty,ShowCount Properties March 9, 2011Posted by Abhijit Jana in .NET 4.0, ASP.NET, ASP.NET 4.0, Tips and Tricks.
Tags: ASP.Net, asp.net 4.0, C#, codeproject, EmptyTemplate, Repeater, Repeater EmptyTemplate, ShowCount, ShowFooterWhenEmpty
If you have worked with ASP.NET GridView Control you must be aware of GridView.EmptyDataTemplate Property which Gets or sets the user-defined content for the empty data row when a GridView control data source has no records. Similarly ShowHeaderWhenEmpty property allows you to show or hide the Header row when there is no records. These are the really good and very frequent required properties. Now, if you are working with the Repeater Control, it doesn’t have any direct features which enables you to set user define content when data source is empty. In this blog post I will discuss how we can create a custom ASP.NET Repeater control with support of EmptyTemplate along with few more important features.