Which below is specified by the DataSource Property?
-
Connection object
-
DataAdapter object
-
Database field
-
Database table
-
Dataset object
In ADO.NET data binding, the DataSource property of a control (like a DataGrid) is typically assigned to a Dataset or DataView object. This object holds the disconnected cache of data that the control will render for the user.
To answer this question, you need to understand the concept of the DataSource property.
The DataSource property is used to specify the source of data for a control in a user interface. It is commonly used in programming languages like C# and ASP.NET.
Let's go through each option to understand why it is correct or incorrect:
Option A) Connection object - This option is incorrect because the DataSource property is not used to specify a connection object.
Option B) DataAdapter object - This option is incorrect because the DataSource property is not used to specify a DataAdapter object.
Option C) Database field - This option is incorrect because the DataSource property is not used to specify a specific database field.
Option D) Database table - This option is incorrect because the DataSource property is not used to specify a specific database table.
Option E) Dataset object - This option is correct because the DataSource property can be set to a Dataset object, which contains the data that will be displayed in the control.
The correct answer is E. This option is correct because the DataSource property is used to specify a Dataset object as the source of data for a control.