Obviously, the actual style of the odd/even rows will be done via a CSS class, but what is the best way to \"attach\" the class to the rows? Is is better to put it in the ma
What you're trying to accomplished can even be done with CSS3:
tr:nth-child(odd) { background: #FFF; }
tr:nth-child(even) { background: #AAA; }
This is also listed in the w3's css3 selectors spec. If you're looking for compatibility, adding the class server-side or through javascript would be a far better solution.