nerdexam
Microsoft

98-363 · Question #195

You create a webpage that displays recipes. You develop code that optimizes how the webpage is rendered for different web browsers. You need to ensure that the web server caches a version of the…

The correct answer is A. VaryByParam. You can vary caching of user-control output in two ways: Specify the user control name along with either a query string or a form POST parameter. You can do this declaratively using the VaryByParam attribute of the @ OutputCache directive. Alternatively, you can do it…

Understanding Web Applications

Question

You create a webpage that displays recipes. You develop code that optimizes how the webpage is rendered for different web browsers. You need to ensure that the web server caches a version of the page for the major version of each different web browser type that requests the webpage. Which attribute of the page OutputCache directive should you use?

Options

  • AVaryByParam
  • BVaryByHeader
  • CVaryByCustom
  • DVaryByControl

How the community answered

(41 responses)
  • A
    83% (34)
  • B
    10% (4)
  • C
    2% (1)
  • D
    5% (2)

Explanation

You can vary caching of user-control output in two ways: * Specify the user control name along with either a query string or a form POST parameter. You can do this declaratively using the VaryByParam attribute of the @ OutputCache directive. Alternatively, you can do it programmatically by setting VaryByParams property in the PartialCachingAttribute in the user control's code. * Specify the ID property of an ASP.NET server control contained in the user control. You can do this declaratively using the VaryByControl attribute. Alternatively, you can do it programmatically by setting the VaryByControls property in the PartialCachingAttribute.

Topics

#OutputCache directive#ASP.NET caching#VaryBy#browser compatibility

Community Discussion

No community discussion yet for this question.

Full 98-363 Practice