Style odd table rows differently in ASP.Net MVC

Posted by ripper234 on Stack Overflow See other posts from Stack Overflow or by ripper234
Published on 2010-04-17T11:43:09Z Indexed on 2010/04/17 11:53 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

Help me replace this code, both me and Resharper don't like it:

<table width="100%">
<% for (int row = 0; row < 10; ++row) {%>
<%= "<tr" + ((row % 2 == 0) ? " class='even'" : "") + ">" %>

...

</tr>
<%}%>
</table>

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about ASP.NET