HttpCachePolicy.SetETagFromFileDependencies Method

Sets the ETag HTTP header based on the time stamps of the handler's file dependencies.

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

public:
void SetETagFromFileDependencies ()
public void SetETagFromFileDependencies ()
public function SetETagFromFileDependencies ()
Not applicable.

Exception typeCondition

InvalidOperationException

The ETag header has already been set.

TheSetETagFromFileDependencies method sets the ETag header by retrieving the last modified time stamps of all files on which the handler is dependent, combining all file names and time stamps into a single string, then hashing that string into a single digest that is used as the ETag.

The following code example demonstrates how to set the ETag header.

No code example is currently available or this language may not be supported.
get_Response().get_Cache().SetETagFromFileDependencies();

Response.Cache.SetETagFromFileDependencies()
 

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, 1.1, 1.0

Community Additions

ADD
Show: