当前位置:系统之家 > 技术开发教程 > 详细页面

Asp Object 之:ContentType

Asp Object 之:ContentType

更新时间:2022-05-22 文章作者:未知 信息来源:网络 阅读次数:

ContentType

ContentType 属性指定响应的 HTTP 内容类型。如果未指定 ContentType,默认为 text/HTML。

语法

Response.ContentType [= ContentType ] 

参数

ContentType
描述内容类型的字符串。该字符串通常被格式化为类型/子类型,其中类型是常规内容范畴而子类为特定内容类型。有关支持内容类型的完整列表,请参阅 Web 浏览器文档或当前的 HTTP 规格说明。

示例

下面的示例将内容类型设置为 Channel Definition Format(CDF)。

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

下面的示例将 ContentType 属性设置为其他的常见值。

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

应用于

Response 对象


温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行