Fork me on GitHub

PagerOptions.PageIndexParameterName property

Gets or sets the page index parameter name in the current route.

Syntax:

public string PageIndexParameterName {get; set;}

Default value:

“pageIndex”

Example:

@Html.Pager(Model,new PagerOptions{PageIndexParameterName="id"})

This property value can also be set via the Options method as bellow:

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetPageIndexParameterName("id"))

AjaxPager:

@Ajax.Pager(Model).Options(o=>o.SetPageIndexParameterName("id")).AjaxOptions(a=>a.SetUpdateTargetId("target"))