NumericPagerField::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. |
The following table lists the available button types.
Button type value | Description |
|---|---|
A Button control. | |
An ImageButton control. | |
A LinkButton control. |
When the ButtonType property is set to ButtonType::Image, you must provide the URL of an image for the next-page and previous page buttons. To do this, you can use the NextPageImageUrl and PreviousPageImageUrl properties. The corresponding text property is used as the alternate text for the image. For example, the text that is specified by the NextPageImageUrl property is displayed as the alternate text for the next-page image button. On browsers that support tooltips, this text is also displayed as a tooltip for the corresponding button.
The value of the ButtonType property is stored in view state.
If the DataPager::QueryStringField property is not an empty string or null, the NumericPagerField object ignores the value of the ButtonCount property. In that case, the HyperLink control is used to create the buttons.
The following example shows how to use the ButtonType property to specify that image buttons are displayed in the NumericPagerField object of a DataPager control.
Available since 3.5