Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?



Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?..

Answer / 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

More ASP.NET Interview Questions

What are the 3 types of web?

0 Answers  


What are the different properties of server control that exists?

0 Answers   Cap Gemini,


how to add cliet side event to server side? and how to register client script to sever side? wt difference these two

3 Answers   PSI Data Systems,


Can you nest updatepanel within each other?

0 Answers  


what is client back feauture ?

1 Answers  






What is the difference between application object and session object?

4 Answers   IBS,


What is cross page posting? How is it done?

0 Answers  


What is HTTP MODULE & HTTP HANDLERS in ASP.NET? How a developer can utilize in the application? Please provide example.

1 Answers   IBM,


Define web services in asp.net.

0 Answers  


Explain the difference between Repeater and Data list control in ASP.NET?

0 Answers  


To bind columns manually which tags do you need to add within the asp:datagrid ?

0 Answers   Siebel,


What is full trust in asp.net?

0 Answers  


Categories