Using Grid for Sorting, Searching, Paging functionality in MVC4 ASP.Net With Entity Framework
my problem is:
i was done the sorting, searching and paging functionality in mvc4 but when pageing is working not probable for search functionality
the ERROR is:
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[Company.Models.EmployeeDetails]', but this dictionary requires a model item of type 'PagedList.IPagedList`1[Company.Models.EmployeeDetails]'.
below is pageing functionality in emplist.cshtml
@model PagedList.IPagedList
@using PagedList.Mvc;
page@(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount @Html.PagedListPager(Model, page => Url.Action("EmpList", new { page }), PagedListRenderOptions.PageNumbersOnly) |
if i comment the aboue pageing functionality Perfectly working Searching functionality
if anyone known please provide answer
Replies
Know the answer? Post it — somebody with the same question will find it here.