What should you do?

You are implementing an ASP.NET Web application that retrieves data from a Microsoft SQL Server database. You add a page that includes the following data source control.
<asp:SqlDataSource id="sqlds" runat="server" ConnectionString="<%$ ConnectionStrings:MyDB %>"
SelectCommand="SELECT * FROM Companies" />
The page is accessed frequently, but the data in the database rarely changes.
You need to cache the retrieved data so that the database is not queried each time the Web page is accessed. What should you do?
A. Add the following attributes to the SqlDataSource control.
DataSourceMode=”DataSet”
EnableCaching=”True”
CacheDuration=”120″
B. Add the following attributes to the SqlDataSource control.
DataSourceMode=”DataReader”
EnableCaching=”True”
CacheDuration=”120″
C. Add the following configuration to the <system.web/> section of the web.config file.

D. Add the following configuration to the <system.web/> section of the web.config file.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.