Multiple choice technology programming languages

The property TypeName must be set for which ASP.NET data source control?

  1. AccessDataSource

  2. SqlDataSource

  3. ObjectDataSource

  4. XmlDataSource

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ObjectDataSource control requires the TypeName property to be set to specify the fully-qualified name of the business object class that contains the data methods. Unlike AccessDataSource or SqlDataSource which work directly with data stores, ObjectDataSource bridges UI controls to custom business logic objects, hence it needs to know which class to instantiate.

AI explanation

ObjectDataSource is designed to bind to a custom business object or middle-tier class rather than a direct data connection, so it requires the TypeName property to specify which class to instantiate and call methods on (along with SelectMethod, etc.). SqlDataSource and AccessDataSource connect directly to a database via connection strings/SQL commands and have no notion of a business object type. XmlDataSource works with XML documents/XPath, not a class, so TypeName is irrelevant to it.