Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?
Answer Posted / arunendra shukla
OutputCache is used to control the caching policies of an ASP.NET page or user control. To cache a page @OutputCache directive should be defined as follows < %@ OutputCache Duration="100" VaryByParam="none" % >
VaryByParam: A semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each specified parameter. Possible values include none, *, and any valid query string or POST parameter name.
VaryByHeader: A semicolon-separated list of HTTP headers used to vary the output cache. When this attribute is set to multiple headers, the output cache contains a different version of the requested document for each specified header.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between asp and asp.net?
Is sql backend or frontend?
What is css and what is it used for?
What are session and cookies?
Explain different authentication modes in asp.net?
What is the significance of proxy user?
How will you do Redo and Undo in a TextControl?
What are custom user controls in asp.net?
What is OSI layer? Explain different layers.
How to Insert/Add in ASPXgridview
How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.
Which is an advantage of application service providers?
I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)
What is distributed system in asp.net?
What is the use of HttpHandlers? When to use this?