I have the following code in MVC view. The view is receiving IEnumerable of Anonymous Type. it has 3 fields - TranscriptReqStatusID, TranscriptReqStatusDesc and Count. I am not able to loop and put the data in a Table. It's giving me this error - " Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'TranscriptReqStatusDesc'"
@model IEnumerable<dynamic>
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div>
<table>
@foreach (dynamic item in Model)
{
<tr>
<td>@item.TranscriptReqStatusDesc.ToString()</td>
<td>@item.Count.ToString()</td>
</tr>
}
</table>
</div>