Dear All,
I am taking over quite a big ASP.NET MVC project, and I am just trying to make it work on my computer. It is asp.net MVC 1 project and I will continue developing in with Visual Studio 2010. I have set up the database and everything however I have a strange problem and no clue why it happens:
the project uses strongly typed views but somehow all the models are just handeled as plain objects instead of their real types in the views (in every view). I have tried and I can cast the model to the real type (Model as RealType
) and then it works, though it is ugly and I do not want to do in in 500 places in the project.... When I try to run the application the error I get is this:
CS1061: 'object' does not contain a definition for 'SomeProperty' and no extension method 'SomeProperty' accepting a first argument of type 'object' could be found
Of cource the Model actually has a property called SomeProperty that I can access after I cast it....
Anyone has any idea why is that?
Thanks a lot for any help