Beshoy Wageh

Beshoy Wageh

  • NA
  • 33
  • 4.5k

this code the first foreach working but the second not work

Jan 13 2019 8:17 AM
i using asp.net mvc 
i using debbuging but the second foreach stopped  
@foreach (var item in Model)
{
<h3>@Html.DisplayFor(model => item.CategoryName)</h3>
<h6>@Html.DisplayFor(model => item.CategoryDescription)</h6>
foreach (var subItem in item.Jobs)
{
<div class="row">
<div class="col-md-3">
<img src="~/Uploads/@subItem.JobImage" />
<h3>@Html.DisplayFor(model => subItem.JobType)</h3>
<h3>@Html.DisplayFor(model => subItem.JobDescription)</h3>
<button class="btn btn-default">????????</button>
</div>
</div>
}
}
 

Answers (1)