ContentType

ContentType 속성은 응답에 대한 HTTP 컨텐트 형식을 지정합니다. ContentType을 지정하지 않으면 기본값은 text/HTML입니다.

구문

Response.ContentType [= ContentType ]

매개 변수

ContentType
컨텐트 형식을 설명하는 문자열입니다. 이 문자열은 대개 type/subtype 형식입니다. 여기서 type은 일반적인 컨텐트 범주이고 subtype은 특정 컨텐트 형식입니다. 지원되는 컨텐트 형식의 전체 목록을 보려면 사용하는 웹 브라우저 설명서나 현재 HTTP 지정을 참조하십시오.

예제

다음은 컨텐트 형식을 채널 정의 형식(CDF)으로 설정하는 예제입니다.

<% Response.ContentType = "application/x-cdf" %>
 

다음은 ContentType 속성을 다른 일반 값으로 설정한 예입니다.

<% Response.ContentType = "text/HTML" %>
<% Response.ContentType = "image/GIF" %>
<% Response.ContentType = "image/JPEG" %>
<% Response.ContentType = "text/plain" %>
<% Response.ContentType = "image/JPEG" %>

적용

Response 개체


© 1997-2001 Microsoft Corporation. All rights reserved.