You can do this by making use of the DataItemIndex property.
The following example will create an opening div tag that uses a different class for odd and even items:
<%-- Add one to zero-indexed DataItemIndex --%>
<%# ((1+DataItemIndex)%2)==0?"<div class='even'>":"<div class='odd'" %>
See the following Knowledgebase article for more details on special properties available in transformations:
Using special item data in transformation
-ag-