public ref class OutputCacheProfileCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.OutputCacheProfile))]
public sealed class OutputCacheProfileCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.OutputCacheProfile))>]
type OutputCacheProfileCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class OutputCacheProfileCollection
Inherits ConfigurationElementCollection
// Get the Web application configuration.
System.Configuration.Configuration webConfig =
WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section.
string configPath =
"system.web/caching/outputCacheSettings";
System.Web.Configuration.OutputCacheSettingsSection outputCacheSettings =
(System.Web.Configuration.OutputCacheSettingsSection)webConfig.GetSection(
configPath);
// Get the profile collection.
System.Web.Configuration.OutputCacheProfileCollection outputCacheProfiles =
outputCacheSettings.OutputCacheProfiles;
' ' Get the Web application configuration.
Dim webConfig _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim configPath As String = _
"system.web/caching/outputCacheSettings"
Dim outputCacheSettings _
As System.Web.Configuration.OutputCacheSettingsSection = _
CType(webConfig.GetSection(configPath), _
System.Web.Configuration.OutputCacheSettingsSection)
' Get the profile collection.
Dim outputCacheProfiles _
As System.Web.Configuration.OutputCacheProfileCollection = _
outputCacheSettings.OutputCacheProfiles