(PartialView) The model item passed into the dictionary is of type ‘Customer’, but this dictionary requires a model item of type ‘UserProfile’

Make sure your Model.UserProfile is not null.

I found your post trying to debug the same error, and it turned out I hadn’t initialised my “Model.UserProfile” equivalent.

I guess what’s happening here, is that if a null model is passed to RenderPartial, it defaults to using the main view’s model? Can anyone confirm this?

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)