This documentation is archived and is not being maintained.

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.

ExceptionCondition
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.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: