Fork me on GitHub

PagerOptions.ContainerTagName property

Gets or sets the HTML tag name for the container element of the pager.

Syntax:

public string ContainerTagName {get; set;}

Default value:

div

Example:

@Html.Pager(Model,new PagerOptions{ContainerTagName="ul"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetContainerTagName("ul"))

AjaxPager:

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