【转】【Asp.Net】ASP.Net Response.ContentType 详细列表
不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式. 代码如:
显示的为网页,而
则会显示html原代码.
以下为一些常用的 ContentType
GIF images
JPEG images
TIFF images
MICROSOFT WORD document
RTF document
MICROSOFT EXCEL document
MICROSOFT POWERPOINT document
PDF document
ZIP document
下面是更详细的ContentType
'ez' => 'application/andrew-inset',
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'doc' => 'application/msword',
'bin' => 'application/octet-stream',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => 'application/octet-stream',
'class' => 'application/octet-stream',
'so' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => 'application/pdf',
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'wbxml' => 'application/vnd.wap.wbxml',
'wmlc' => 'application/vnd.wap.wmlc',
'wmlsc' => 'application/vnd.wap.wmlscriptc',
'bcpio' => 'application/x-bcpio',
'vcd' => 'application/x-cdlink',
'pgn' => 'application/x-chess-pgn',
'cpio' => 'application/x-cpio',
'csh' => 'application/x-csh',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'spl' => 'application/x-futuresplash',
'gtar' => 'application/x-gtar',
'hdf' => 'application/x-hdf',
'js' => 'application/x-javascript',
'skp' => 'application/x-koan',
'skd' => 'application/x-koan',
'skt' => 'application/x-koan',
'skm' => 'application/x-koan',
'latex' => 'application/x-latex',
'nc' => 'application/x-netcdf',
'cdf' => 'application/x-netcdf',
'sh' => 'application/x-sh',
'shar' => 'application/x-shar',
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'sv4cpio' => 'application/x-sv4cpio',
'sv4crc' => 'application/x-sv4crc',
'tar' => 'application/x-tar',
'tcl' => 'application/x-tcl',
'tex' => 'application/x-tex',
'texinfo' => 'application/x-texinfo',
'texi' => 'application/x-texinfo',
't' => 'application/x-troff',
'tr' => 'application/x-troff',
'roff' => 'application/x-troff',
'man' => 'application/x-troff-man',
'me' => 'application/x-troff-me',
'ms' => 'application/x-troff-ms',
'ustar' => 'application/x-ustar',
'src' => 'application/x-wais-source',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => 'application/zip',
'au' => 'audio/basic',
'snd' => 'audio/basic',
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'kar' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => 'audio/mpeg',
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'm3u' => 'audio/x-mpegurl',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'wav' => 'audio/x-wav',
'pdb' => 'chemical/x-pdb',
'xyz' => 'chemical/x-xyz',
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'ief' => 'image/ief',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'png' => 'image/png',
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'djvu' => 'image/vnd.djvu',
'djv' => 'image/vnd.djvu',
'wbmp' => 'image/vnd.wap.wbmp',
'ras' => 'image/x-cmu-raster',
'pnm' => 'image/x-portable-anymap',
'pbm' => 'image/x-portable-bitmap',
'pgm' => 'image/x-portable-graymap',
'ppm' => 'image/x-portable-pixmap',
'rgb' => 'image/x-rgb',
'xbm' => 'image/x-xbitmap',
'xpm' => 'image/x-xpixmap',
'xwd' => 'image/x-xwindowdump',
'igs' => 'model/iges',
'iges' => 'model/iges',
'msh' => 'model/mesh',
'mesh' => 'model/mesh',
'silo' => 'model/mesh',
'wrl' => 'model/vrml',
'vrml' => 'model/vrml',
'css' => 'text/css',
'html' => 'text/html',
'htm' => 'text/html',
'asc' => 'text/plain',
'txt' => 'text/plain',
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'sgml' => 'text/sgml',
'sgm' => 'text/sgml',
'tsv' => 'text/tab-separated-values',
'wml' => 'text/vnd.wap.wml',
'wmls' => 'text/vnd.wap.wmlscript',
'etx' => 'text/x-setext',
'xsl' => 'text/xml',
'xml' => 'text/xml',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'mxu' => 'video/vnd.mpegurl',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
'ice' => 'x-conference/x-cooltalk'
//---------------------下面是从资源文件获取图片。并显示
public class GetImage
{
public static System.Drawing.Image GetSrc(string name)
{
System.Resources.ResourceManager rm = new ResourceManager("ClassLibrary.ResourceTestImg",
System.Reflection.Assembly.GetExecutingAssembly());//ResourceTestImg为资源文件名称,ClassLibrary//为命名空间
return rm.GetObject(name) as System.Drawing.Image;
} } //显示代码
protected void Page_Load(object sender, EventArgs e)
{ System.Drawing.Image img = ClassLibrary.GetImage.GetSrc("_15958260");
//_15958260为在ResourceTestImg.resx资源管理窗口中看到资源图片名称 img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
}
原文地址:http://www.cnblogs.com/chenghm2003/archive/2008/10/19/1314703.html
【转】【Asp.Net】ASP.Net Response.ContentType 详细列表的更多相关文章
- Response.ContentType 详细列表 <转>
Response.ContentType 详细列表 不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式.代码如: <% ...
- Response.ContentType 详细列表-请求的内容类型详细记录
Response.ContentType 详细列表-请求的内容类型详细记录 作者:王春天一.应用实例: Response.Clear(); Response.ContentType = "t ...
- Response.ContentType 详细列表
不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式. 代码如: <% response.ContentType =&quo ...
- Response.ContentType 详细列表 (转载)
不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式.代码如: <% response.ContentType =" ...
- [转]网页ContentType详细列表
本文转自:来老师的专栏 http://blog.csdn.net/sweetsoft/article/details/6512050 不同的ContentType 会影响客户端所看到的效果.默认的 ...
- asp.net下Response.ContentType类型汇总
在ASP.NET中使用Response.ContentType="类型名";来确定输出格式 'ez' => 'application/andrew-inset', 'hqx' ...
- asp.net 8 Request,Response,Server
Request成员: 1.Request.UrlReferrer 获取请求的来源,可以防盗链 Response.Write(Request.Url.ToString());//获取当前请求的URL地址 ...
- jQuery Ajax方法调用 Asp.Net WebService、WebMethod 的详细实例代码
将以下html存为ws.aspx <%@ Page Language="C#" AutoEventWireup="true" %> <scri ...
- ASP测试代码: <% response.write("helloworld,vbscript!") %>
ASP测试代码: <% response.write("helloworld,vbscript!") %>
随机推荐
- http连接优化
http连接的性能优化 并行连接(能够同一时候和多台server建立HTTP连接) 持久连接 管道化连接 复用的连接 并行连接 长处: 并行连接能够在带宽资源充足的情况下同一时候建立多个HTTP连接, ...
- winform dataGridView DataGridViewComboBoxColumn 下拉框事件
有一个dataGridView ,有一列是DataGridViewComboBoxColumn .用动态绑定,在绑定数据的时候.我们也给这一列绑定数据 在dataGridView的RowsAdded事 ...
- Linux前台、后台、挂起、退出、查看命令汇总
command & 直接在后台执行程序 ctrl+c 退出前台的命令,不再运行 ctrl+z挂起前台命令暂停运行,回到shell命令行环境中 bg 将刚挂起的命令放到后台执行 bg % ...
- win10 U盘安装ubuntu16.04双系统
所需工具U盘,软件ultralISO.ubuntu16.04,自己使用的系统是win10 一.制作U盘启动盘 打开ultraISO软件 2 2 3 4 开始写入—>直到完成大概五分的样子 二. ...
- nginx配置文件中location说明
1 nginx配置文件 文件结构 ... #全局块 events { #events块 ...} http #http块 { ... #http全局块 server #server块 { ... #s ...
- CSDN日报20170403 ——《该不该离职?它说了算!》
[程序人生]该不该离职?它说了算! 作者:安晓辉 我在加油站工作,月薪扣除五险一金2000多.工作时间长,上班48小时歇息8小时. 今年单位改革把我们都外包出去了,承包人对我各种苛刻要求.有心辞职去干 ...
- Linux安装Qt详细步骤 亲测总结
下载 qt-everywhere-opensource-src-4.8.4.tar.gz================准备工作====================yum install kern ...
- Ip地址和子网掩码和CIDR无间别域间路由
开始,网络的制定者将网络划分为A,B,C三种网络,想这个样子: A类网: xxx.0.0.0 子网掩码:255.0.0.0 xxx.0.0.0/8 //后面的数字代表网络地址的字段 ...
- paip.中文 分词 ---paoding 3.1 的使用
paip.中文 分词 ---paoding 3.1 的使用 paoding 3.1 下载: 1 设置字典路径 1 测试代码 1 作者Attilax 艾龙, EMAIL:1466519819@qq. ...
- [na]数据包由于isp不稳定丢包-seq&ack
知识参考: http://www.xianren.org/net/wireshark-q.html 背景 总行wac管理分行ap.手机终端打不开portal页面. 2,分别抓包(portal页面从wa ...