I want to have a strongly typed user control that accepts a class PaginatedList<T>
What my signature for this user control will look like and how to do it?
At the moment, I have this as my signature for the user control:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Project.Models.PaginatedList<Project.Models.Product>>" %>
Obviously this does not work when I pass a PaginatedList that contains something other than the product. Like here when I want to send a PaginatedList from the news:
<% Html.RenderPartial("Pagination", Model.NewsItems); %>
Any help would be greatly appreciated.
source
share