@model GRHModel.ListeDemandeConger
@{
ViewBag.Title = "AfficherMesDemandes";
Layout = "~/Views/Home/Common.cshtml";
}
<table class="table table-responsive" style="width:400px">
@foreach (var dc in Model.ldc)
{
<tr>
<td>
@Html.DisplayFor(i =>dc.DateDebut)
</td>
</tr>
}
</table>
答案 0 :(得分:0)
您的模型为空。 用IF检查模型!= null。
围绕你的foreach@if (Model != null)
{
your foreach
}