Model view controller MVC中的多行网格
谁在Mvc中制作多行网格?我该怎么做呢?请帮帮我 谢谢Model view controller MVC中的多行网格,model-view-controller,Model View Controller,谁在Mvc中制作多行网格?我该怎么做呢?请帮帮我 谢谢 Vicky以下是您一般的做法(记住MVC中没有网格视图!) 0)%%> 对象属性1名称 对象属性2名称。。 Mvc是什么意思?ASP.NETMVC?@giorgian-我认为ASP.NETMVC是一个很好的猜测-unknown的其他问题都与此有关。 <% if (Model != null && Model.Count() > 0) %> <% { %> <tabl
Vicky以下是您一般的做法(记住MVC中没有网格视图!)
0)%%>
对象属性1名称
对象属性2名称。。
Mvc是什么意思?ASP.NETMVC?@giorgian-我认为ASP.NETMVC是一个很好的猜测-unknown的其他问题都与此有关。
<% if (Model != null && Model.Count() > 0) %>
<% { %>
<table>
<tr>
<th>
Object property 1 name
</th>
<th>
Object property 2 name..
</th>
</tr>
<% int i = 0; foreach (var item in Model) %>
<% { %>
<tr class="<%= i++ % 2 == 0 ? "cssPrimaryGridRow" : "cssAltGridRow" %>">
<td>
<%= Html.Encode(item.Property1)%>
</td>
<td>
<%= Html.Encode(item.Property2)%>
</td>
</tr>
<% } %>
</table>
<% } %>