使用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