Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
PageCount Property

PagedDataSource.PageCount Property

Gets the total number of pages necessary to display all items in the data source.

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

public int PageCount { get; }

Property Value

Type: System.Int32
The number of pages necessary to display all items in the data source.

Use the PageCount property to determine the number of pages necessary to display all items in the data source.

NoteNote

If the DataSource property is null, 0 is returned. If the IsPagingEnabled property is set to false or the DataSourceCount property is set to 0 or less, 1 is returned.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft