Fork me on GitHub

PagerOptions.InvalidPageIndexErrorMessage property

Gets or sets the error message to be displayed when page index is invalid (not a valid integer).

Syntax:

public string InvalidPageIndexErrorMessage {get; set;}

Default value:

Page index is invalid

Example:

@Html.Pager(Model,new PagerOptions{InvalidPageIndexErrorMessage="Invalid page index"})

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

HtmlPager:

@Html.Pager(Model).Options(o=>o.SetInvalidPageIndexErrorMessage("Invalid page index"))

AjaxPager:

@Ajax.Pager(Model).Options(o=>o.SetInvalidPageIndexErrorMessage("Invalid page index")).AjaxOptions(a=>a.SetUpdateTargetId("target"))