0
今私が知りたいのは、画像を剃刀ビューの「img src」にバインドする方法だけです。他の質問は検索しましたが、 "〜/ Images /"はアップロードされた画像があるフォルダです。剃刀の画像を<img src>のループにバインドする
@model List<propertyMgmt.Models.Property>
<div id="propertyList">
<label>Select properties to be Featured:</label><br />
<table class="table">
<tr>
<th>
@Html.Label("Property Description")
</th>
<th>
@Html.Label("Property Cost")
</th>
<th>
@Html.Label("Property Image")
</th>
<th>
@Html.Label("Featured??")
</th>
</tr>
@for (int i=0;i<Model.Count;i++)
{
<tr>
<td>
@Html.DisplayFor(m => m[i].PropertyDescription)
</td>
<td>
@Html.DisplayFor(m => m[i].PropertyCost)
</td>
<td>
<img src="~/Images/@(m=>m[i].PropertyImage)" />
</td>
<td>
@Html.CheckBoxFor(m => m[i].IsFeatured, new {
@onclick = "propertyCheckBoxSelect(this)" })
</td>
</tr>
}
</table>
</div>
'@Model [i] .PropertyImage' – DavidG
Thank You David !! :) –