收藏

论坛

BT

下载

学堂

生活

首页

您所在的位置: 首页 » ASP教程 » ContentType

ContentType
作者:ljjk5 发表时间:2007-5-11 阅读:698次 字体: 在百度搜索相关内容

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 对象
#Advertisement
聚友网提供免费、超短二级域名
软件下载
赞助商连接
关于我们 | 联系我们 | 广告联系 | 友情链接 | 版权申明
Copyright © 2005-2008, Power by Jokcn.Com Website name 网友俱乐部 All rights reserved
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号