HttpCachePolicy.SetLastModified Method

Sets the Last-Modified HTTP header to the DateTime value supplied.

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

public:
void SetLastModified (
	DateTime date
)
public void SetLastModified (
	DateTime date
)
public function SetLastModified (
	date : DateTime
)
Not applicable.

Parameters

date

The new DateTime value for the Last-Modified header.

Exception typeCondition

ArgumentOutOfRangeException

date is later than the current DateTime.

The Last-Modified HTTP header time stamps the document with the DateTime value indicating when the document was last modified.

This method will fail if the caching restrictiveness hierarchy is violated.

The following code example demonstrates how to set the Last-Modified header to a new date.

No code example is currently available or this language may not be supported.

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: