Export (0) Print
Expand All
19 out of 48 rated this helpful - Rate this topic

Response.ContentType

IIS 6.0

The ContentType property specifies the HTTP content type for the response. If no ContentType is specified, the default is text/HTML.

ContentType

A string describing the content type. This string is usually formatted as type/subtype, where type is the general content category, and subtype is the specific content type. For a full list of supported content types, see your Web browser documentation or the current list of MIME Media Types.

The following example sets the content type to Channel Definition Format (CDF).


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

The following examples set the ContentType property to other common values.


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


Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.