I have the following view:-
@foreach(var info in Model.Firewall.FirewallCustomers.OrderBy(a=>a.CustomerName)){
<td>@Html.DisplayFor(info.CustomerVLAN.VLANID)</td>
}
But I am unable to write the following
@Html.DisplayFor(info.CustomerVLAN.VLANID)</td>
I will get the following error:-
The type arguments for method 'System.Web.Mvc.Html.DisplayExtensions.DisplayFor(System.Web.Mvc.HtmlHelper, System.Linq.Expressions.Expression>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
So can anyone advice , how to use DisplayFor inside my foeach loop ?
Thanks
varwith the type ofinfoin theforeach