Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

The model item passed into the dictionary but requires different model.

$
0
0

I am running into this on alot of projects and still haven't found why or what to do to fix it.

Whenver i use a block controller for my block, and pass a view model of the block that contains lets say a content area on the block.  When i go to my view and do a property for on the cotnent area that is on the block, it tries to pass the view model @model MyBlockViewModel  in as the property instead of the contentarea on MyBlockViewModel.  Why would the propertyfor or displayfor try to render my actual "Model" instead of the property contentarea on the model  PropertyFor(x=>x.CurrentBlock.ContentArea).  I am baffled.


Viewing all articles
Browse latest Browse all 6894

Trending Articles