Fork me on GitHub

PagerOptions.ShowFirstLast property

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

Syntax:

public bool ShowFirstLast {get; set;}

Default value:

true

Example:

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

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

HtmlPager:

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

AjaxPager:

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

Live demo:

@Html.Pager(Model).Options(o=>o.HideFirstLast())
Prev12345678910...Next