Where is the public class PaginatedList<T> : List<T> class? Under what namespace is the class? It seems to me that the namespace the class is under is wrong, and it is in not a namespace that's part of your project. So the class cannot
be found in the chtml view.
Or you need an @using pointing to the namespace that PaginnatedList is under.
If the PaginatedList class was in the correct namespace, then it should be found, and you wouldn't need a @using pointing to the namespace the class is under.
If you find the post has answered your issue, then please mark post as 'answered'.
Member
22 Points
75 Posts
Type or namespace name 'PaginatedList<>' could not be found(are you missing a using drirective o...
May 24, 2020 12:16 AM|Sentoso|LINK
Hi All,
I tried to implement PaginatedList to one of my View Page Index.cshtml base on reference from : https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/sort-filter-page?view=aspnetcore-3.1 I have followed step by step from that docs, but I got an error
Type or namespace name 'PaginatedList<>' could not be found(are you missing a using drirective or an assembly reference ?)
the original code
Since I want to use Pagination, so I changed It to
Does anyone know how to implement PaginatedList correctly ?
Regards,
Sentoso
Contributor
4953 Points
4207 Posts
Re: Type or namespace name 'PaginatedList<>' could not be found(are you missing a using drirecti...
May 24, 2020 06:46 AM|DA924|LINK
To me, this link is quite clear as to what to do. I think things will work for you if you follow the tutorial explicitly.
https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/sort-filter-page?view=aspnetcore-3.1
Where is the public class PaginatedList<T> : List<T> class? Under what namespace is the class? It seems to me that the namespace the class is under is wrong, and it is in not a namespace that's part of your project. So the class cannot be found in the chtml view.
Or you need an @using pointing to the namespace that PaginnatedList is under.
If the PaginatedList class was in the correct namespace, then it should be found, and you wouldn't need a @using pointing to the namespace the class is under.
Member
22 Points
75 Posts
Re: Type or namespace name 'PaginatedList<>' could not be found(are you missing a using drirecti...
May 24, 2020 11:02 AM|Sentoso|LINK
Hi DA924,
Thanks for the advice, It is working @using somenamespace.
Regards,
Sentoso