asp.net.ph

HttpCacheVaryByHeaders Item Property

System.Web Namespace   HttpCacheVaryByHeaders Class


Sets or retrieves a custom header field that the origin server adds to the Vary HTTP header.

In [ C# ], this property is the indexer for the HttpCacheVaryByHeaders class.

[ VB ]
Public Default Property Item ( _
   ByVal header As String _
) As Boolean

[ C# ]
public bool this  [ 
   string header
] {get; set;}

[ C++ ]
public: __property bool get_Item (
   String* header
);
public: __property void set_Item (
   String* header,
   bool
);

[ JScript ]
returnValue = HttpCacheVaryByHeadersObject.Item ( header );
HttpCacheVaryByHeadersObject.Item ( header ) = returnValue;
-or-
returnValue = HttpCacheVaryByHeadersObject ( header );
HttpCacheVaryByHeadersObject ( header ) = returnValue;

In [ JScript ], you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [ JScript ]

header
The name of the custom header.

Parameters

header
The name of the custom header.

Property Value

The default value is false. When set to true, this property causes ASP.NET to add the specified custom field to the Vary HTTP header sent to the client.

Exceptions


Exception Type Condition
ArgumentNullException Occurs when header is a null reference ( Nothing in Visual Basic ).

Remarks

The Vary header indicates the request-header fields that the server uses to determine which of multiple cached responses is sent in response to a client request.

For background information on HTTP headers, see Section 14 Header Field Definitions in the Hypertext Transfer Protocol ( HTTP/1.1 ) documentation, available from the World Wide Web Consortium.

See Also

HttpCacheVaryByHeaders Members   Caching Multiple Versions of a Page Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph