System.Web.UI.WebControls Namespace
.NET Framework version 2.0
Represents the properties of the paging controls in a control that supports pagination. This class cannot be inherited.
Visibility |
Name |
Value Type |
Accessibility |
public |
FirstPageImageUrl
|
String |
[ Get , Set ] |
public |
FirstPageText
|
String |
[ Get , Set ] |
public |
LastPageImageUrl
|
String |
[ Get , Set ] |
public |
LastPageText
|
String |
[ Get , Set ] |
public |
Mode
|
PagerButtons |
[ Get , Set ] |
public |
NextPageImageUrl
|
String |
[ Get , Set ] |
public |
NextPageText
|
String |
[ Get , Set ] |
public |
PageButtonCount
|
Int32 |
[ Get , Set ] |
public |
Position
|
PagerPosition |
[ Get , Set ] |
public |
PreviousPageImageUrl
|
String |
[ Get , Set ] |
public |
PreviousPageText
|
String |
[ Get , Set ] |
public |
Visible
|
Boolean |
[ Get , Set ] |
|
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 |
NextPrevious |
Previous-page and next-page buttons. |
NextPreviousFirstLast |
Previous-page, next-page, first-page, and last -page buttons. |
Numeric |
Numbered link buttons to access pages directly. |
NumericFirstLast |
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.
As an alternative, you can also display images for the non-numeric buttons by setting the properties as shown in the following table.
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 example demonstrates use of the PagerSettings object to customize the behavior of the pager in a FormView control.
Show me