System.Web Namespace HttpCachePolicy Class
Sets the ETag HTTP header to the specified string.
[ VB ]
Public Sub SetETag ( _
ByVal etag As String _
)
[ C# ]
public void SetETag (
string etag
);
[ C++ ]
public: void SetETag (
String* etag
);
[ JScript ]
public function SetETag (
etag : String
);
- etag
- The text to use for the ETag header.
The ETag header is a unique identifier for a specific version of a document. Once an ETag header is set, subsequent attempts to set it will fail and an exception will be thrown.
The following example sets the ETag header to a custom value.
[ VB ]
Response.Cache.SetETag ( "50f59e42f4d8bc1:cd7" )
[ C# ]
Response.Cache.SetETag ( "50f59e42f4d8bc1:cd7" );
[ JScript ]
Response.Cache.SetETag ( "50f59e42f4d8bc1:cd7" )
HttpCachePolicy Members Caching ASP.NET Pages