简体   繁体   中英

NuGet PagedList not working in ASP.NET MVC

I am using PagedList in MVC aspx application for pagination but while runtime got error that

does not contain a definition for Html.PagedListPager and no extension method

I have installed PagedList.Mvc 4.5.0.0 and used in aspx page ,in controller included name space PagedList but when i am adding PagedList.Mvc i got compile time error...

Assembly 'PagedList.Mvc, Version=4.5.0.0, Culture=neutral, PublicKeyToken=abbb863e9397c5e1' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

To resolve above error i have added <add assembly="PagedList.Mvc" namespace="PagedList.Mvc" tagPrefix="plmvc"/> in web.config but no change.

Please Help

Go to Tools-->Nu-Get Package Manager-->Package Manager Console Then a window will appear at the bottom of Visual studio. Just type the command PM> Install-Package PagedList.Mvc -Version 3.18.0

The above command should be as it is any space added will not work. Happy coding

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM