?
Solved

using a partial view with a different model

Posted on 2014-11-04
3
Medium Priority
?
126 Views
Last Modified: 2015-01-07
I have a page that uses a @model IEnumerable<T>. I want to include a partial view on the page that has its own model. How can I add this?

I keep getting an error The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[]', but this dictionary requires a model item of type ''.
0
Comment
Question by:NickMalloy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 40423930
In the partial view, did you add a @model attribute?
0
 

Author Comment

by:NickMalloy
ID: 40424977
Yes I did
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 40425035
Can you show me the main view, where you call the partial view, and the partial view?
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question