I work through this sample and ran into a problem. To implement pagination, the sample expands the list and adds pagination to it. This list is then used as a model.
In my opinion, I want to add a pagination control. In the sample, they simply add it to the page, but I want to make it a user control, because I plan to implement pagination on several pages. Of course, this should be a strongly typed representation, but since I cannot use wildcards in C #, I cannot implement it like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PaginatedList<?>>" %>
Since I only plan on using the members declared in the PaginatedList and not in the List , I don't need a type.
In the C # method, we could solve this problem with type inference, but how to partially do this?
source share