Q:
You are creating an ASP.NET page for selling movie tickets. Users select a region, and then they select from a list of cities in that region. The site displays the names and locations of movie theaters in the city selected by the user.
Your company, XYZ Brothers, maintains a list of theaters in a database table that includes the city, name, and street address of each theater. You want to minimize the time required to retrieve and display the list of theater names after a user selects the region and city.
What should you do?
Answer & Explanation
Answer: B) Add the following directive to the page: OutputCache VaryByParam=?
Explanation: You can vary user control output to the cache by specifying the user control name and the parameter. We use the VaryByParam attribute of the OutputCache
Incorrect Answers:
A: The Packet Size property of the Connection string is the size in bytes of the network packets sed to communicate with an instance of data provider. It is not an optimal property to change to optimize data retrieval.
C: The company database does not seem to include a region column.
D: If we keep the connection pool small we would allow less simulation connections. However, this would not minimize the required to retrieve and display the data.
View Answer
Report Error
Discuss