我终于想出了一个办法。
型号:
public class ChequeSearch
{
//Search criteria
[DisplayName("Draft Number")]
public string DraftNumber { get; set; }
[DisplayName("Payee")]
public string Payee { get; set; }
//Search results
public int? SearchResults1Page { get; set; }
public int? SearchResults2Page { get; set; }
public IPagedList<Cheque> SearchResults1 { get; set; }
public IPagedList<Cheque> SearchResults2 { get; set; }
public string SearchButton { get; set; }
}
查看:
在搜索结果表1下:
@Html.PagedListPager(Model.SearchResults1,
page => Url.Action("Search", new RouteValueDictionary() {
{ "SearchResults1Page", page },
{ "SearchResults2Page", Model.SearchResults2Page },
{ "DraftNumber", Model.DraftNumber },
{ "Payee", Model.Payee }
}),
PagedListRenderOptions.DefaultPlusFirstAndLast)
在搜索结果表2下:
@Html.PagedListPager(Model.SearchResults2,
page => Url.Action("Search", new RouteValueDictionary() {
{ "SearchResults2Page", page },
{ "SearchResults1Page", Model.SearchResults1Page },
{ "DraftNumber", Model.DraftNumber },
{ "Payee", Model.Payee }
}),
PagedListRenderOptions.DefaultPlusFirstAndLast)
感谢您的关注。