System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the number of items to be used from the data source.

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

public int Count { get; }
public:
property int Count {
	virtual int get() sealed;
}
abstract Count : int with get
override Count : int with get
Public ReadOnly Property Count As Integer

Property Value

Type:

The number of items to be used from the data source.

Implements

Use the property to determine the number of items to be used from the data source. The value returned depends on whether paging is enabled and whether custom paging is used.

  • If paging is disabled (by setting the property to false), the value of the property is returned.

  • If paging is enabled (by setting the property to true) and custom paging is enabled (by setting the property set to true), the value of the property is returned.

  • If paging is enabled (by setting the property to true) and the property is set to false, the value of the property is returned.

  • If paging is enabled (by setting the property to true), custom paging is disabled (by setting the property false), and the property is set to true, the value of the property is subtracted from the value of the property before it is returned.

System_CAPS_noteNote

If the property contains null, 0 is returned.

.NET Framework
Available since 1.1
Return to top