【发布时间】:2020-12-01 14:59:28
【问题描述】:
我正在尝试构建一个包含多个主题 tr 的表,但我得到了 tobdy element was not closed 和 foreach block is missing a close } 有没有更好的方法来做到这一点?
<table id="kendoGrid">
@{foreach (titleViewModel objTitle in Model)
{
<thead>
<tr>
@objTitle.Name
</tr>
<tr>
<th>Name</th>
<th>Meeting Date</th>
<th>Type</th>
</tr>
</thead>
<tbody>
@foreach (DataViewModel objData in objMeeting.PanelsMeetingViewModel)
{
<tr>
<td>@objData.Name</td>
<td>@objData.Date</td>
<td>@objData.Type</td>
</tr>
}
<tbody>
}
</table>
【问题讨论】:
标签: asp.net-mvc-4 razor