PagerSettings::Mode Property
Gets or sets the mode in which to display the pager controls in a control that supports pagination.
Assembly: System.Web (in System.Web.dll)
public: property PagerButtons Mode { PagerButtons get (); void set (PagerButtons value); }
Property Value
Type: System.Web.UI.WebControls::PagerButtonsOne of the PagerButtons values. The default is PagerButtons.Numeric.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The Mode is set to a value that is not one of the PagerButtons values. |
Controls that support pagination provide multiple modes in which to display the paging controls. Use the Mode property to specify the mode. The following table describes the different modes for pagination controls.
Mode | Description |
|---|---|
Previous-page and next-page buttons. | |
Previous-page, next-page, first-page, and last-page buttons. | |
Numbered link buttons to access pages directly. | |
Numbered and first-link and last-link buttons. |
When the Mode property is set to the NextPrevious, NextPreviousFirstLast, or NumericFirstLast value, you can specify custom text for the non-numeric buttons by setting the properties shown in the following table.
Property | Description |
|---|---|
Text for the first-page button. | |
Text for the previous-page button. | |
Text for the next-page button. | |
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.
Property | Description |
|---|---|
The URL to an image to display for the first-page button. | |
The URL to an image to display for the previous-page button. | |
The URL to an image to display for the next-page button. | |
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 FirstPageImageUrl property is set, the text that is specified by the 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.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: