HttpCachePolicy.SetLastModified(DateTime) 메서드

정의

Last-Modified HTTP 헤더를 제공된 DateTime 값으로 설정합니다.

public:
 void SetLastModified(DateTime date);
public void SetLastModified (DateTime date);
member this.SetLastModified : DateTime -> unit
Public Sub SetLastModified (date As DateTime)

매개 변수

date
DateTime

Last-Modified 헤더의 새 DateTime 값입니다.

예외

date가 현재 DateTime보다 이후인 경우

예제

다음 코드 예제에서는 헤더를 새 날짜로 설정하는 Last-Modified 방법을 보여 줍니다.

Response.Cache.SetLastModified(DateTime.Parse("1/1/2001 00:00:01AM"));
Response.Cache.SetLastModified(DateTime.Parse("1/1/2001 00:00:01AM"))

설명

Last-Modified HTTP 헤더 타임스탬프는 문서가 마지막으로 수정된 시기를 나타내는 값으로 DateTime 문서에 스탬프를 찍습니다.

캐싱 제한 계층 구조를 위반하면 이 메서드가 실패합니다.

SetLastModified .NET Framework 버전 3.5에서에서 도입 되었습니다. 자세한 내용은 버전 및 종속성을 참조하세요.

적용 대상