Fork me on GitHub

PagerOptions.MorePagerItemTemplate property

Gets or sets the html template to be applied to the more pager items.

Syntax:

public string MorePagerItemTemplate {get; set;}

Default value:

null

Example:

@Html.Pager(Model,new PagerOptions{MorePagerItemTemplate="<span class=\"morepages\">{0}</span>"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetMorePagerItemTemplate("<span class=\"morepages\">{0}</span>"))

AjaxPager:

@Ajax.Pager(Model).Options(o=>o.SetMorePagerItemTemplate("<span class=\"morepages\">{0}</span>")).AjaxOptions(a=>a.SetUpdateTargetId("target"))

Live demo:

<style type="text/css">
.morepages {font-weight: bold;}
.morepages a {color: red;}
</style>
@Html.Pager(Model).Options(o => o.SetMorePagerItemTemplate("<span class=\"morepages\">{0}</span>"))
FirstPrev12345678910...NextLast