This documentation is archived and is not being maintained.
PagedDataSource.DataSourceCount Property
.NET Framework 1.1
Gets the number of items in the data source.
[Visual Basic] Public ReadOnly Property DataSourceCount As Integer [C#] public int DataSourceCount {get;} [C++] public: __property int get_DataSourceCount(); [JScript] public function get DataSourceCount() : int;
Property Value
The number of items in the data source.
Exceptions
| Exception Type | Condition |
|---|---|
| HttpException | The data source is not an System.Collections.ICollection implemented object. |
Remarks
Use the DataSourceCount property to determine the number of items in the data source. If custom paging is used, the value of the VirtualCount property is returned; otherwise, the total number of items in the data source is returned.
Note If the DataSource property contains a null reference (Nothing in Visual Basic), 0 is returned.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
PagedDataSource Class | PagedDataSource Members | System.Web.UI.WebControls Namespace
Show: