Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we have multiple web config files for an asp.net application?

984


Describe session handling in a webfarm, how does it work and what are the limits?

1082


For which does this Codebehind="MyCode.aspx.cs" is relevent to ?

1063


Which library is used by the testers and developers to develop automated tests and create testing tools?

1006


witch is the best insistute in sharpoint course.what abt future of share point course.

3470


Explain the asp.net session state modes.

1075


What is loop in asp.net?

1102


Which method do you use to enforce garbage collection in .net?

968


What is application variable?

949


What are the different types of cookies in asp.net?

1029


How can you pass multiple complex types in Web API?

1077


What is cookieless session id explain in brief?

1047


How does cookies work in asp net?

1072


Can you set which type of comparison you want to perform by the comparevalidator control?

911


What is difference between web config and global asax?

871