element IEnumerable< > is not supported
i have used the following code in my view and made the model it is giving the error in (IEnumerable<ITClassifieds.Models.Resume>
)
<%--
foreach (ITClassifieds.Models.Resume c in (IEnumerable<ITClassifieds.Models.Resume>)ViewData["getresume"])
{ %>
<input type="radio" name="resumeID" value="<%=c.ResumeID %>" checked="checked"/>Yes
<input type="radio" name="resumeID" value="0"/>开发者_StackOverflow;No
<%} %>
Go back to where you are setting getresume in your controller.. confirm that it is setting to what you are expecting.
Post the full error you are receiving.
Or
- Create yourself a viewmodel and use that instead. Dynamics are great and I use them a fair amount but when it comes to views I always go with strongly typed.
http://geekswithblogs.net/michelotti/archive/2009/10/25/asp.net-mvc-view-model-patterns.aspx - Talks about a few different ways to do your viewmodels.
Another interesting link would be -> ViewModel Best Practices
精彩评论