NextPreviousPagerField::ButtonType Property
Gets or sets the button type to display in the pager field.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
Property Value
Type: System.Web.UI.WebControls::ButtonTypeOne of the ButtonType values. The default is ButtonType.Link.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The value for the ButtonType property is not one of the ButtonType values. |
Use the ButtonType property to specify which type of button is displayed in a button field. The following table lists the available button types.
Button type value | Description |
|---|---|
A Button control. | |
An ImageButton control. | |
A LinkButton control. |
When ButtonType is set to ButtonType.Image, you must set the image to display for the buttons by using 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. |
The value of the ButtonType property is stored in viewstate.
The following example shows how to use the ButtonType property to specify that image buttons are displayed in the NextPreviousPagerField object of a DataPager control.
Available since 3.5