Fork me on GitHub

PagerOptions.Id property

>Gets or sets the ID of the top DOM element that is the container of all pager items.

Syntax:

public string Id {get; set;}

Default value:

null

Example:

@Html.Pager(Model,new PagerOptions{Id="mypager"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetId("mypager"))

AjaxPager:

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