Fork me on GitHub

PagerOptions.ControllerName property

Gets or sets the name of the controller class.

Syntax:

public string ControllerName {get; set;}

Default value:

Controller name in the current view context.

Example:

@Html.Pager(Model,new PagerOptions{ControllerName="Home"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetControllerName("Home"))

AjaxPager:

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