Fork me on GitHub

PagerOptions.PageIndexBoxId property

Gets or sets the ID of the page index box (must be textbox or dropdownlist).

Syntax:

public string PageIndexBoxId {get; set;}

Default value:

null

Example:

@Html.Pager(Model,new PagerOptions{PageIndexBoxId="pageBox"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetPageIndexBoxId("pageBox"))

AjaxPager:

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

Live demo:

See Using page index box>>