NumericPagerField::ButtonCount Property

 

Gets or sets the number of buttons to display in a NumericPagerField object.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public:
property int ButtonCount {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The number of buttons to display in a NumericPagerField object. The default is 5.

Exception Condition
ArgumentOutOfRangeException

The ButtonCount property is set to a value less than 1.

Use the ButtonCount property to specify the number of buttons to display in a NumericPagerField object. Each button corresponds to a page number. If the NumericPagerField object has more pages than the number specified for ButtonCount, the control displays a next-page button that lets users access the next set of pages.

The NumericPagerField object displays buttons only for existing page numbers. If the NumericPagerField object has fewer pages to show than the number specified for ButtonCount, the control shows fewer buttons than the number specified by this property.

The following example shows how to use the ButtonCount property to change the default number of page buttons that 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: