This documentation is archived and is not being maintained.

DataSourceView.ExecuteSelect Method

Gets a list of data from the underlying data storage.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

protected public:
virtual IEnumerable^ ExecuteSelect (
	DataSourceSelectArguments^ arguments
) abstract
protected abstract IEnumerable ExecuteSelect (
	DataSourceSelectArguments arguments
)
protected internal abstract function ExecuteSelect (
	arguments : DataSourceSelectArguments
) : IEnumerable
Not applicable.

Parameters

arguments

A DataSourceSelectArguments that is used to request operations on the data beyond basic data retrieval.

Return Value

An IEnumerable list of data from the underlying data storage.

The ExecuteSelect method is called to retrieve data from the underlying data store and return it as an IEnumerable object. All data source controls support data retrieval from their underlying data storage, even if other operations such as insertion and sorting are not supported. Because a data-bound control can request a list of data at any time as a result of a DataSourceChanged event or a DataBind method call, the data retrieval must be performed on demand.

The following code example demonstrates how to override the ExecuteSelect method in a class that extends the DataSourceView class. The CsvDataSourceView opens a comma-separated value (.csv) file, parses it line by line, and creates a DataTable object and a DataView object to hold the data in memory. Finally, a sort expression is applied if one is supplied by the DataSourceSelectArguments object, and the DataView object is returned as an IEnumerable instance. This code example is part of a larger example provided for the DataSourceView class.

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: