小库平台



欢迎您 本站地址:  
返回首页   返回编程教学   网络开发源码  看电影  课程  软件  中国象棋  看电视直播  学习jQueryEasyUI  学习AJAX 

ASP ContentType 属性


Response 对象参考手册 完整的 Response 对象参考手册

ContentType 属性为 response 对象设置 HTTP 内容类型。

语法

response.ContentType[=contenttype]

参数 描述
contenttype 描述内容类型的字符串。

如需完整的内容类型列表,请参阅您的浏览器文档或 HTTP 规范。

实例

如果 ASP 页面没有设置 ContentType 属性,那么默认的 content-type 头部是这样的:

content-type:text/html

其他一些常用的 ContentType 值:

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

此例会在浏览器中打开一个 Excel 电子表格(如果用户已经安装了 Excel ):

<%response.ContentType="application/vnd.ms-excel"%>
<html>
<body>
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
</table>
</body>
</html>


Response 对象参考手册 完整的 Response 对象参考手册

小库网-更多推荐

诗词名句看图猜一猜职场故事
友情故事网站打包生成app照片会说话
字符统计工具2048圣诞老人过悬崖
吃完豆豆小库软件外语歌曲
音乐搜索快手副业引流脚本
爆炸音效搞怪音效碰撞音效
经济学书籍经典史说书籍女生头像背影
企业网站源码端游源码六十甲子速查表
Emoji符号大全中医百科旋转的八卦图
儿童科普知识商朝历史元朝历史
夏商周周书元史
粥饭类除湿利水茶学习JavaScript
学习Linux学习CMake学习SQLite

欢迎您来到小库网!
小库提示

扫描下方二维码,访问手机版。