使用ajax选项时,如何在PagedListPager
中使用PagedListRenderOptions
。如何在使用ajax选项时在PagedListPager中使用PagedListRenderOptions?
@Html.PagedListPager((IPagedList)Model, page =>
Url.Action("AllProducts", "Products", new { page }),
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "productsContent", OnBegin = "onBeginLoader", OnComplete = "onComplete" }))
我wnat财产以后这样的修改:
@Html.PagedListPager((IPagedList)ViewBag.posts, page =>
Url.Action("Index", new { page = page }), new PagedListRenderOptions
{ LinkToFirstPageFormat = "<< ابتدا", LinkToPreviousPageFormat = "< قبلی", LinkToNextPageFormat = "بعدی>", LinkToLastPageFormat = "آخرین >>" })
请编辑你的问题,包括视图代码和控制器代码 – Monah