<% foreach (var ModalLogin in Model) // CS1579: foreach statement cannot operate on variables of type 'MVCLoginForm.Models.ModalLogin' because 'MVCLoginForm.Models.ModalLogin' does not contain a public definition for 'GetEnumerator' { %> <tr> <td> <%= Html.ActionLink("Record", "Record", ModalLogin)%> </td> <td> <%= Html.Encode(ModalLogin.Name)%> </td> <td> <%= Html.Encode(ModalLogin.Email)%> </td> </tr> <% } %>
it should be IEnumerable or IQueryable.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)