HttpCacheVaryByParams::Item Property (String^)
Gets or sets a value indicating whether the cache varies according to the specified HTTP request parameter.
Assembly: System.Web (in System.Web.dll)
public: property bool default[ String^ header ] { bool get(String^ header); void set(String^ header, bool value); }
Parameters
- header
-
Type:
System::String^
The name of the custom parameter.
| Exception | Condition |
|---|---|
| ArgumentNullException | header is null. |
When used as an accessor (getter), the Item indexer returns true if a value for the specified parameter is found in the current parameters collection, or if the collection is set to vary by * (an asterisk), which indicates all parameters.
When used as a mutator (setter), the Item indexer sets the value for the parameter in the parameters collection that corresponds to the specified header to true. The value * can be specified, which indicates all parameters.
The following code example demonstrates how the Item indexer is accessed from the HttpCachePolicy object associated with an HttpResponse.
Available since 1.1