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
what is publisher?
How do I publish my asp.net application to my isp's web server?
Is asp.net a programming language?
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
What are the features of asp.net mvc?
What's the use of formatters in .net?
How can you implement encapsulation in asp.net?
Explain what is an assembly?
Explain the difference between web user control and web custom control?
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.
What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?
What are the contents of cookie?
What is aspect-oriented programming?
What is autopostback in asp net?
How asynchronous call can be implemented using delegates?