使用PagedList分页,如

@Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page = page }))

  

随后用到了时间搜索

<div class="search_title">来访时间</div>
@Html.TextBox("StartTime", ViewData["StartTime"], new { type = "text"})
<div class="search_title">至</div>
@Html.TextBox("EndTime", ViewData["EndTime"], new { type = "text"})

  

 

怎么把搜索条件传入到action呢?

 

可使用ViewData解决:

@Html.PagedListPager(Model, page => Url.Action("Index", new {page, StartTime = ViewData["StartTime"], EndTime = ViewData["EndTime"]}))

 

参考网站:http://q.cnblogs.com/q/45680/

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2021-11-23
  • 2021-05-03
猜你喜欢
  • 2022-12-23
  • 2021-06-22
  • 2021-11-28
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2021-07-18
相关资源
相似解决方案