1
votes

i have created content part in orchard1.6 i enabled the content part in Features in admin panel and i add that in my page type as a part of that content part, now my problem is while i am going to edit the specific page it giving the following error

" The model item passed into the dictionary is of type 'fileuploads.models.fileuploadpart', but this dictionary requires a model item of type 'orchard.contrib.fileupload.models.fileupoadviewmodel'. "

if any one knows about this issue am looking forward to know that, it would be help full. thanks in advance.

2
Can you post your driver Editor functions and your admin View source? Without seeing those it will all be speculations..Ivan Ferić

2 Answers

0
votes

Looks like you're passing a model object of an incorrect type to the editor shape. The type of the model object you pass to the editor in your driver (using EditorTemplate), must match the @using definition in the cshtml template file.

Hard to say more without seeing the actual code.

0
votes

Looks like you should put
@model fileuploads.models.fileuploadpart
in your .cshtml

Have you tried that?

Btw, only do that on the .cshtml of the editor template. The part .cshtml itself should have a dynamic model.