NumericPagerField::ButtonType Property

 

Gets or sets the button type to display in the pager field.

Namespace:   System.Web.UI.WebControls
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::ButtonType

One 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

ButtonType::Button

A Button control.

ButtonType::Image

An ImageButton control.

ButtonType::Link

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: