System.Web.UI.WebControls.PagerSettings.Mode Property

Gets or sets the mode in which to display the pager controls in a control that supports pagination.

Syntax

[System.ComponentModel.DefaultValue(System.Web.UI.WebControls.PagerButtons.Numeric)]
[System.ComponentModel.NotifyParentProperty(true)]
public PagerButtons Mode { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Controls that support pagination provide multiple modes in which to display the paging controls. Use the PagerSettings.Mode property to specify the mode. The following table describes the different modes for pagination controls.

PagerButtons.NextPrevious

Previous-page and next-page buttons.

PagerButtons.NextPreviousFirstLast

Previous-page, next-page, first-page, and last-page buttons.

PagerButtons.Numeric

Numbered link buttons to access pages directly.

PagerButtons.NumericFirstLast

Numbered and first-link and last-link buttons.

When the PagerSettings.Mode property is set to the PagerButtons.NextPrevious, PagerButtons.NextPreviousFirstLast, or PagerButtons.NumericFirstLast value, you can specify custom text for the non-numeric buttons by setting the properties shown in the following table.

PagerSettings.FirstPageText

Text for the first-page button.

PagerSettings.PreviousPageText

Text for the previous-page button.

PagerSettings.NextPageText

Text for the next-page button.

PagerSettings.LastPageText

Text for the last-page button.

As an alternative, you can also display images for the non-numeric buttons by setting the properties shown in the following table.

PagerSettings.FirstPageImageUrl

The URL to an image to display for the first-page button.

PagerSettings.PreviousPageImageUrl

The URL to an image to display for the previous-page button.

PagerSettings.NextPageImageUrl

The URL to an image to display for the next-page button.

PagerSettings.LastPageImageUrl

The URL to an image to display for the last-page button.

Note:

When an image property is set, the corresponding text property acts as the alternate text for the image. For example, when the PagerSettings.FirstPageImageUrl property is set, the text that is specified by the PagerSettings.FirstPageText property is displayed as the alternate text for the image. On browsers that support ToolTips, this text is also displayed as a ToolTip for the corresponding button.

The value of this property is stored in view state.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0