Fork me on GitHub

PagerOptions.ShowPrevNext property

Gets or sets a value indicating whether the previous page and the next page pager items should be displayed.

Syntax:

public bool ShowPrevNext {get; set;}

Default value:

true

Example:

@Html.Pager(Model,new PagerOptions{ShowPrevNext=false})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.HidePrevNext())

AjaxPager:

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

Live demo:

@Html.Pager(Model).Options(o=>o.HidePrevNext())
First12345678910...Last