早教吧 育儿知识 作业答案 考试题库 百科 知识分享

一个MVC的问题,我用了一个ascx页面,引用model里面的数据,就出现这个错误,是咋回事啊?Themodelitempassedintothedictionaryisoftype'CarData.OrderCarShareAndUser'butthisdictionaryrequiresamodelitemoftype'Syst

题目详情
一个MVC的问题,我用了一个ascx页面,引用model 里面的数据,就出现这个错误,是咋回事啊?
The model item passed into the dictionary is of type 'CarData.OrderCarShareAndUser' but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[CarData.OrderCarShareAndUser]'
▼优质解答
答案和解析
写的很明显了,页面需要一个OrderCarShareAndUser的集合,但是你穿过去的是单个OrderCarShareAndUser
看了 一个MVC的问题,我用了一个...的网友还看了以下: