So, I was browsing my page's source today, tracking down some other oddity, when I noticed that the properties I'm displaying in a list from my model are all wrapped with a span (cool), and all have an id attribute for the property's name (in this case, not cool). The issue is, it's a list of items, so there are multiple spans with the same ID. How should I be doing this? I see it's the default convention for DisplayFor.
Here is an example of my Spark view. Note, I'm using the overload of DisplayFor that accepts a model object to work on (not the view's model in this case).
<table id="products" class="data">
<thead>
<tr>
<th>Name</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr each="var product in Model.Products">
<td><Display model="product" property="Name" /></td>
<td><Display model="product" property="Price" /></td>
</tr>
</tbody>
</table>
Should I be using something other than DisplayFor for this?