Hi.
I would like something like "AlternatingItemTemplate" in a PageList (to get a different background color on every other line). Is there someting like this built into the control or does anyone have an idea how to do it?
/Markus
Hi.
I can think of two alternatives:
1. Operate with a counter that increments with 1 for each item in the pagelist, and check (with modulus) in ItemTemplate to see if you should render out f.ex.
...
2. Create your own PageList control (inherit from PageListData), create a new AlternatingItemTemplate in your new control, override CreateChildControls(), and put every second item into the AlternatingItemTemplate.
If you have downloaded the SDK, you will see after packing out the files, that under the "source" folder, the actual sourcecode for the PageList is provided here for you to study.
Frank :)