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.net mvc and asp.net webforms
If you want to bind the columns manually within the asp:datagrid tags what kind of tags you have to add.
What are the new data controls in asp.net 2.0?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com
Where is the session stored?
explain code with multi inhertance
Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
Explain one critical mapping?
Explain an object, class and method.
Is it possible to apply themes to an asp.net application? If yes, then how?
How response object is related to asp's response object?
Why would a company use an application service provider?
What is Web Server Control Templates.?
explain code with datachaching with example
Describe the Server Control Events of ASP.NET?