c# | 首都客運時刻表查詢網
![c#](https://i.imgur.com/2oxSoeJ.png)
我目前正在使用TroyGoode'sHtml.PagedListPager,但它旨在使用Url.Action()发送URL中的参数。这是一个例子。我不认为客户端过滤是一种选择,因为我会有很多记录 ...
![c#](https://i.imgur.com/2oxSoeJ.png)
这是我的问题。我有一个 SearchViewModel有大量搜索条件,这些值根本不适合 URL。我目前正在使用 Troy Goodes Html.PagedListPager ,但它旨在使用 Url.Action()发送 URL 中的参数。这是一个例子。我不认为客户端过滤是一种选择,因为我会有很多记录。
@Html.PagedListPager( (IPagedList)@Model.SearchResults, page => Url.Action("Results", new { YearBuiltFrom = Model.YearBuiltFrom, } )) } 如果您只有一两个简单参数,这是一个很好的解决方案。 搜索 View 模型 public class SearchViewModel { public int? page { get; set; } public int? size { get; set; } [IgnoreDataMember] public IPagedList<Property> SearchResults { get; set; } public string[] Locations { get; set; } [IgnoreDataMember] public MultiSelectList LocationOptions { get; set; } public string[] ZipCodes { get; set; } [IgnoreDataMember] public MultiSelectList ZipCodeOptions { get; set; } [Display(Name="Year Built...How to use pagedlist with post method | 首都客運時刻表查詢網
2018年10月31日 — Post)) <section> <h3>Localisation</h3> @* <div class=form-group> @Html.LabelFor(model => model.DirGeoSelected, Direction geo ... Read More
Is there an MVC Pager that uses POST instead of GET? | 首都客運時刻表查詢網
I don't think client-side filtering is an option, due to the fact I'll have a lot of records. @Html.PagedListPager( (IPagedList)@Model.SearchResults, page => ... Read More
Can I use a | 首都客運時刻表查詢網
It's going back to your GET action because the Url.Action renders as an <a> tag. An <a> link ALWAYS performs a GET . Read More
How to use pagedlistpager when passing a viewmodel to my ... | 首都客運時刻表查詢網
It does not make sense to do so. Your method should be a GET, not a POST and you cant pass a complex object containing a collection property to a GET method ( ... Read More
MVC posting IPagedList | 首都客運時刻表查詢網
<div style=text-align: center> @Html.PagedListPager(new StaticPagedList<ClientViewModel>(Model.Clients, Model. Read More
PagedListPager does not fire related action in controller | 首都客運時刻表查詢網
2017年2月7日 — Index Post action is never called by pagedlistpager.Here are my methods. // Get public ActionResult Index(string searchItem = ) ... Read More
| 首都客運時刻表查詢網
2021年6月11日 — @html.pagedlistpager post 提交,asp.net MVC使用PagedList.MVC实现分页效果 ... 在上一篇的EF之DB First中,存在以下的两个问题:. 1. 添加/编辑页面显示的 ... Read More
c# | 首都客運時刻表查詢網
我目前正在使用 Troy Goode's Html.PagedListPager ,但它旨在使用 Url.Action() 发送URL 中的参数。这是一个例子。我不认为客户端过滤是一种选择,因为我会有很多记录 ... Read More
相關資訊整理