Hello Guys,
I came to know what I m missing, Partial View doesn't got Request.QueryString values thats why paging control lost search parameters and loads all records. So I modified Pager control in _PartialView.cshtml as follows :
@Html.PagedListPager(Model,
page => Url.Action("AjaxMethod",
new
{
page,
searchByUserName = ViewBag.searchByUserName,
searchByReaderName = ViewBag.searchByReaderName,
searchByReaderType = ViewBag.searchByReaderType,
searchByUploadDate = ViewBag.searchByUploadDate,
sortBy = ViewBag.sortBy
}),
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions()
{ HttpMethod = "GET", UpdateTargetId = "divData", LoadingElementId="divloading" })
)
These ViewBag objects initialized in controllers action method.
Anyone having better solution than this for the above problem. Please suggest.