PagedList分页,如何添加action参数
使用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/
posted on 2016-07-18 15:23 zhucheng88 阅读(1080) 评论(0) 收藏 举报
浙公网安备 33010602011771号