NextPreviousPagerField::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.

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

Button

A Button control.

Image

An ImageButton control.

Link

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

FirstPageImageUrl

The URL to an image to display for the first-page button.

PreviousPageImageUrl

The URL to an image to display for the previous-page button.

NextPageImageUrl

The URL to an image to display for the next-page button.

LastPageImageUrl

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.

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

.NET Framework
Available since 3.5
Return to top
Show: