PagerSettings Class
Represents the properties of the paging controls in a control that supports pagination. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The PagerSettings type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | FirstPageImageUrl | Gets or sets the URL to an image to display for the first-page button. |
![]() | FirstPageText | Gets or sets the text to display for the first-page button. |
![]() | LastPageImageUrl | Gets or sets the URL to an image to display for the last-page button. |
![]() | LastPageText | Gets or sets the text to display for the last-page button. |
![]() | Mode | Gets or sets the mode in which to display the pager controls in a control that supports pagination. |
![]() | NextPageImageUrl | Gets or sets the URL to an image to display for the next-page button. |
![]() | NextPageText | Gets or sets the text to display for the next-page button. |
![]() | PageButtonCount | Gets or sets the number of page buttons to display in the pager when the Mode property is set to the Numeric or NumericFirstLast value. |
![]() | Position | Gets or sets a value that specifies the location where the pager is displayed. |
![]() | PreviousPageImageUrl | Gets or sets the URL to an image to display for the previous-page button. |
![]() | PreviousPageText | Gets or sets the text to display for the previous page button. |
![]() | Visible | Gets or sets a value indicating whether the paging controls are displayed in a control that supports pagination. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Retrieves the string representation of a PagerSettings object. (Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | IStateManager::IsTrackingViewState | Gets a value that indicates whether the server control is tracking its view state changes. |
![]() ![]() | IStateManager::LoadViewState | Infrastructure. Loads the previously saved view state of the PagerSettings object. |
![]() ![]() | IStateManager::SaveViewState | Infrastructure. Saves the current view state of the PagerSettings object. |
![]() ![]() | IStateManager::TrackViewState | Infrastructure. Marks the starting point at which to begin tracking and saving view state changes to the PagerSettings object. |
Controls that support pagination (such as the GridView, DetailsView, and FormView controls) can display a set of controls called the pager that allows the user to navigate the pages within the control. The PagerSettings class is used by these controls to represent the properties of the pager. In general, the PagerSettings object is stored in the PagerSettings property of the control. You can customize the pager by setting the properties of the PagerSettings object.
The pager supports several different display modes. To specify the mode in which to display the pager, set the Mode property. The following table describes the different modes.
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-link, first-link, and last-link buttons. |
When the Mode property is set to the NextPrevious, NextPreviousFirstLast, or NumericFirstLast value you can customize the text of 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 as 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. |
When the Mode property is set to the Numeric or NumericFirstLast value, you can specify the number of page buttons to display in the pager by setting the PageButtonCount property.
The pager can be displayed at the top, the bottom, or both the top and bottom of a control. To specify the position of the pager, set the Position property. To show or hide the pager, use the Visible property.
The following code example demonstrates how to use the PagerSettings object that is contained in the PagerSettings property to customize the text of the buttons that are displayed in the pager row of a GridView control.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.







Note