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 is DTS package?

2 Answers   Accenture, TCS,


What is cyclomatic complexity and why is it important?

1 Answers  


How can you register a custom server control to a web page?

0 Answers  


How to convert any string to view state format in asp.net? §ÇÛ짬ªª³ö»Ç¾ö»ÂÇ¿¾»¼»¾ö¼ÉÇöÇÏǼ»Ãö®±ª§°ö«³ -- i want convert this string to view state.

1 Answers   iFlex,


why should i use FormsAuthentication.RedirectFromLoginPage (); Method in Form Authentication?Without using this method also it's good??

2 Answers  






how to write html code with ssl

0 Answers   DCI,


Explain about solution explorer window?

0 Answers  


What websites use asp.net?

0 Answers  


How do you use a custom validator? When might you want to use one?

3 Answers   Infosys,


What is Cookies Less Session?

0 Answers  


What are navigation controls? How many navigation controls are there in ASP.NET 4.0?

0 Answers   UGC Corporation,


How to refresh a page in asp.net

4 Answers  


Categories