DataPager::PageSize Property

 

Gets or sets the number of records that are displayed for each page of data.

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

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

Property Value

Type: System::Int32

The number of records that are displayed for each page of data. The default is 10.

Exception Condition
ArgumentOutOfRangeException

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

Use the PageSize property to specify the size of a page of data.

If you have multiple DataPager controls in a page that are bound to the same ListView control, be sure to set the PageSize property of these controls to the same value. If the DataPager controls are set to use different page sizes, the last DataPager control to be initialized determines the actual page size of the ListView control.

The following example shows how to declaratively set the PageSize property in a DataPager control and how to dynamically change its value.

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

.NET Framework
Available since 3.5
Return to top
Show: