1

Pagedlist paging control in my mvc application shows an inactive link of previous and first page when I use PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing for ajaxifying the control. If I don't use PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing, it is working fine but I want to implement ajax. any suggestion will be appreciated. Please let me know if you need more information or my question is not clear enough. I have looked here, here and here.

@Html.PagedListPager(Model, page => Url.Action("Paging", new
       {
           page,
           SDate = Request.QueryString["StartDate"],
           EDate = Request.QueryString["EndDate"],
           PNumber = Request.QueryString["ProjectNumber"],
           SkuID = Request.QueryString["SkuID"]
       }), PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new PagedListRenderOptions()
       { DisplayLinkToPreviousPage = PagedListDisplayMode.IfNeeded}
                             , new AjaxOptions() { HttpMethod = "GET", UpdateTargetId = "results" }))
Community
  • 1
  • 1
Ikram
  • 91
  • 2
  • 8

1 Answers1

2

After struggling a day on such a trivial issue I found the way around it. I need to include Pagedlist control in my partial view rather then in Index view. I am answering because it might help someone else who get into the same situation.

Ikram
  • 91
  • 2
  • 8