0
我正在開發一個帶有mvc3的簡單項目。創建了兩個模型Customer &調用。 在CustomerController中,我使用PagedList進行分頁。我在客戶的索引視圖中顯示分頁。我想在客戶索引視圖中顯示最後5條記錄呼叫列表。我爲Call的索引視圖創建了部分視圖。我使用客戶索引頁上的部分查看方式 -傳入字典的模型項目類型爲'PagedList.PagedList`,但該字典需要一個類型的模型項目。
@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'.
如何解決此問題?