Try our conversational search powered by Generative AI!

Is there a way to get the equivalent of AlternatingItemTemplate from Repeater in NewsList or PageList?

Vote:
 
Hello, I'm trying to apply different CSS to every other line in a NewsList. The Repeater control has the ItemTemplate and AlternateItemTemplate to do it easily. I would rather use the EPiServer control to keep the no hastle pagination function and other functions. Any ideas? Thank you. Regards, Victor Here's my code:
<%--newslistingheader--%> <%-->--%>
<%# Container.CurrentPage[" />
#13241
Oct 19, 2007 9:29
Vote:
 
I resolved this by adding this function from some another recycled code. APSX:
Code Behind: protected int RowIndex = 0; protected string GetRowCSS(int rowIndex) { return RowIndex % 2 == 0 ? "a" : "b"; }
#15546
Oct 19, 2007 11:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.