1
私はこのコードを持っていますが、私はちょうど1の代わりに2行を印刷する方法を疑問に思っています(後で私はそれが画面サイズasp.netのリストから2列の写真を印刷する方法mvc3
@model IEnumerable<FirstWeb.Models.Picture>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
Title
</th>
<th>
Path
</th>
<th>
ConcertYear
</th>
<th>
Title
</th>
<th>
Path
</th>
<th>
ConcertYear
</th>
</tr>
@bool even = false;
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Title)
</td>
<td>
<a [email protected](modelItem => item.Path)><img [email protected](modelItem => item.Path) width="250px" /> </a>
</td>
<td>
@Html.DisplayFor(modelItem => item.ConcertYear)
</td>
</tr>
}
</table>
)可能性が、今のはわずか2列でなければなりませんので、もし私が、私は方法がわからないブール値は、左と右の列