ASP.NET MVC2 TeplatedHelper doesn't render an ID of the HTML's markup

Posted by Tony on Stack Overflow See other posts from Stack Overflow or by Tony
Published on 2010-06-09T19:59:07Z Indexed on 2010/06/09 20:22 UTC
Read the original article Hit count: 143

Filed under:

Hi, I have the code (snippet):

The Model is the IEnumerable object of the Person's class:

<% foreach (var item in Model) 
  { %>
     <tr>
         <td><%= Html.DisplayFor(x=>item.Name) %></td>
     </tr>    
<% } %>

it renders only labels like that:

<td>Tommy</td>

According to the link it should be rendering a HTML markup something like:

alt text

but there is no the ID and the NAME property. Why ?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2