why user AlternatingItemTemplate on listview and copy code from ItemTemplate to AlternatingItemTemplate? i can't see logic? You can alternate with css too...
+2
A:
You can do more with C# than CSS. With an alternating template, every alternating row can be an entirely different slice of HTML, with completely different structural layouts. Not that you'd ever actually want to... The other reason is that the alternating template idea existed in ASP.NET before there was wide browser support for the CSS implementation, meaning you could pull off the effect in all browsers.
Kirk Woll
2010-09-04 13:53:37