Fork me on GitHub

PagerOptions.CssClass property

Gets or sets the css class to be applied to container element of the pager.

Syntax:

public string CssClass {get; set;}

Default value:

null

Example:

@Html.Pager(Model,new PagerOptions{CssClass="demo"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetCssClass("demo"))

AjaxPager:

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