my question is strictly connected with this one ASP.NET MVC View throwing CS1061 error related to type of model object passed as ViewDdata to a view , but my reputation is to small to add a comment there and when I added my question as an 'answer' it was deleted... So please read the question (thread) mentioned above and the answer for it. I followed the steps suggested but it didn't work for me because of the following errors:
(I will post screenshots to show you both the code and the errors. The names of the variables etc. are changed in comparison to Howiecamp's code but the rest is the same because it's the same step in that tutorial.)
Ok so this is what happens when I have "ViewData" in "foreach" loop: screenshot 1
iIf I change it to "Model" like you instructed, suddenly Visual Studio doesn't understand the "foreach": screenshot 2
It does understand it if I put "IEnumerable" in the first line like you suggested, however after that it stops recognizing "Html.ActionLink": screenshot 3: edge.imgur.com/wcgtI.jpg (sorry, as a new user I can post only 2 hyperlinks :| )
What should I do in this case?