Listview and EmptyItemtemplate
There exist only a few articles (Andreas Kraus and Rick Strahl) which describe the usage of listview and datapager. This both controls are "new" to ASP.NET 3.5. The truth is if you use it you can still run it with .NET 2.0, but that's a different story.
I found no/thero information about the EmptyItemTemplate. The EmptyDatatemplate displays alternate content when no data is present ( and no InsertItemTemplate is present- yet another story).
But what is the purpose of Emptyitemtemplate?
Not what you expect.
After searching for source (it is in Microsoft.Web.Extensions) and view it with reflector I found out that this is only displayed in conjunction with GroupTemplate. This is the "fill" HTML code if the groupitemcount is not from multiple of the number of items to display.
Confused? a picture says more then thousand words ;-)
The groupitemcount is three, pagesize 5. So one group have only two entry's. In that case EmptyItemTemplate is displayed.
Why this happens in my case on top of page is still mystic.
One word to the concept of Listview: I thing its to complex. Div or else must be named by ID and ID's must be set as attribute (or use default names). When something went wrong its very complicated to found the issue. The templates are linked over the ID's in a kind of internal way. It's a complete different approach as other ASP.NET controls are using. At the moment I dont like it.