Microsoft
70-515 · Question #167
You create a page in an ASP.NET Web application. The page retrieves and displays data from a Microsoft SQL Server database. You need to create a data source that can connect to the database. What…
The correct answer is B. Use a SqlDataSource control and configure its ConnectionString in the web.config file. D. Use a LinqDataSource control with entity classes that represent the elements in the database. See the full explanation below for the reasoning.
Question
You create a page in an ASP.NET Web application. The page retrieves and displays data from a Microsoft SQL Server database. You need to create a data source that can connect to the database. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
Options
- AUse an ObjectDataSource control and set its TypeName property to
- BUse a SqlDataSource control and configure its ConnectionString in the web.config file.
- CUse an XmlDataSource control together with an Xml control that represents the database.
- DUse a LinqDataSource control with entity classes that represent the elements in the database.
How the community answered
(35 responses)- A9% (3)
- B71% (25)
- C20% (7)
Community Discussion
No community discussion yet for this question.