NextPreviousPagerField::ButtonType Property
Gets or sets the button type to display in the pager field.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
public: property ButtonType ButtonType { ButtonType get (); void set (ButtonType value); }
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, 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.