Recently I got a bug while doing some code in MVC 2.0 as follows:
foreach statement cannot operate on variables of type 'theCollegehunt.Models.topic' because 'theCollegehunt.Models.topic' does not contain a public definition for 'GetEnumerator'
here topic is name of table added in model theCollegehunt.Models
I Google a lot but didn't get any solution that works.
Finally I modified my Inherits tag in page directive to:
System.Web.Mvc.ViewPage<IEnumerable<theCollegehunt.Models.topic>>
from
System.Web.Mvc.ViewPage<theCollegehunt.Models.topic>
and it worked..!!