Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

OutputCacheSettingsSection.OutputCacheProfiles Property

Gets a OutputCacheProfileCollection.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public OutputCacheProfileCollection OutputCacheProfiles { get; }
/** @property */
public OutputCacheProfileCollection get_OutputCacheProfiles ()

public function get OutputCacheProfiles () : OutputCacheProfileCollection

Not applicable.

Property Value

A OutputCacheProfileCollection of OutputCacheProfile objects

The OutputCacheProfiles property allows you to programmatically access the outputCacheProfiles element in a configuration file. You can use the OutputCacheProfiles property to modify the outputCacheProfiles element programmatically.

The outputCacheProfiles section contains OutputCacheProfile objects that represent output cache settings that may be used by pages in the application. These settings can be applied to a page by setting the CacheProfile attribute of the @ OutputCache directive. Apply the profile to control caching attributes such as dependencies, cache location, and cache expiration time.

The @ OutputCache directive can override all the settings contained by an OutputCacheProfile except the Enabled property. This is to ensure you can enable or disable the OutputCacheProfile without having to modify the directives in all the pages that might have overridden it.

The following code example shows how to use the OutputCacheProfiles property.

// Get the current OutputCacheProfiles property value.
OutputCacheProfileCollection outputCacheProfilesValue =
  outputCacheSettings.OutputCacheProfiles;


Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.