System.Web Namespace HttpCachePolicy Class
Sets the Last-Modified HTTP header to the DateTime value supplied.
[ VB ]
Public Sub SetLastModified ( _
ByVal date As DateTime _
)
[ C# ]
public void SetLastModified (
DateTime date
);
[ C++ ]
public: void SetLastModified (
DateTime date
);
[ JScript ]
public function SetLastModified (
date : DateTime
);
- date
- The new DateTime value for the Last-Modified header.
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.
[ VB, JScript ] The following example sets the Last-Modified header to a new date.
[ VB ]
Response.Cache.SetLastModified ( DateTime.Parse ( "1/1/2001 00:00:01AM" ) )
[ JScript ]
Response.Cache.SetLastModified ( DateTime.Parse ( "1/1/2001 00:00:01AM" ) )
[ C#, C++ ] No example is available for C# or C++. To view a Visual Basic or JScript example, click the Language Filter button in the upper-left corner of the page.
HttpCachePolicy Members Caching ASP.NET Pages