Fork me on GitHub

PagerOptions.ActionName property

Gets or sets the name of the action method.

Syntax:

public string ActionName {get; set;}

Default value:

Action name in the current ViewContext.

Example:

@Html.Pager(Model,new PagerOptions{ActionName="Products"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetActionName("Products"))

AjaxPager:

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