Fork me on GitHub

PagerOptions.FirstPageRouteName property

Gets or sets the route name for the generation of the first page url.

Syntax:

public string FirstPageRouteName {get; set;}

Default value:

Same as the value of RouteName

Example:

@Html.Pager(Model,new PagerOptions{FirstPageRouteName="Default"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetFirstPageRouteName("Default"))

AjaxPager:

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

Live demo:

See First page url SEO>>