在 mvc 4 应用程序中,我有产品搜索页面,Ajax.BeginForm()
它将搜索结果作为部分视图返回。在部分视图中,我有产品列表。在这里,如何为该列表创建分页?只有产品列表,而不是控制器。因为,我不想更改搜索条件。可能吗?
@model IEnumerable<Product>
@{
List<Product> list;
if (Model != null)
{
list = Model
}
else
{
list = (List<Product>)ViewBag.AllProduct;
}
//products shown here....I want to create Pagination for 'list' in only client
}