Share via


HttpResponse.Clear 메서드

정의

버퍼 스트림에서 모든 콘텐츠 출력을 지웁니다.

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

예제

다음 예제에서는 이미지/jpeg에 대 한 응답에 대 한 속성을 설정 ContentType 하 고 응답에 연결 될 수 있는 다른 콘텐츠를 제거 하는 메서드를 호출 Clear 하 고 모든 콘텐츠를 요청 하는 클라이언트에 전송 되기 전에 전체 페이지를 처리 되도록 true로 속성을 설정 BufferOutput 합니다.

전체 예제는 클래스를 참조하세요 HttpResponse .

    // Set the page's content type to JPEG files
    // and clears all content output from the buffer stream.
    Response.ContentType = "image/jpeg";
    Response.Clear();

    // Buffer response so that page is sent
    // after processing is complete.
    Response.BufferOutput = true;
' Set the page's content type to JPEG files
' and clears all content output from the buffer stream.
Response.ContentType = "image/jpeg"
Response.Clear()

' Buffer response so that page is sent
' after processing is complete.
Response.BufferOutput = True

설명

메서드는 Clear 헤더 정보를 지우지 않습니다.

적용 대상

추가 정보