【发布时间】:2012-06-27 05:36:20
【问题描述】:
我正在使用 mvc3 开发一个简单的项目。创建了两个模型客户和电话。 在 CustomerController 中,我使用 PagedList 进行分页。我在客户的索引视图上显示了分页。我想在客户索引视图上显示最后 5 条记录呼叫列表。我为 Call 的索引视图创建了部分视图。我按照以下方式在客户索引页面上使用了部分调用视图--
@Html.Partial("IndexCallPartial")
但在选择客户索引页面后显示错误。错误如下-
The model item passed into the dictionary is of type 'PagedList.PagedList`1[graceCRM.Models.Customer]', but this dictionary requires a model item of type 'graceCRM.Models.Call'.
如何解决这个问题?
【问题讨论】:
标签: asp.net-mvc-3 partial-views pagedlist