Different contenttypes will affect the client's effect. The default ContentType is text/html, that is, the webpage format.
The Code is as follows:
<% Response. ContentType = "text/html" %>
<! -- # I nclude virtual = "/ContentType.html" -->
<% Response. ContentType = "text/plain" %>
<! -- # I nclude virtual = "/sscript/ContentType.html" -->
The original html code is displayed.
The following are some common contenttypes:
GIF images<% Response. ContentType = "image/gif" %>
<! -- # I nclude virtual = "/myimage.gif" -->
JPEG images<% Response. ContentType = "image/jpeg" %>
<! -- # I nclude virtual = "/myimage.jpeg" -->
TIFF images<% Response. ContentType = "image/tiff" %>
<! -- # I nclude virtual = "/myimage. tiff" -->
Microsoft word document<% Response. ContentType = "application/msword" %>
<! -- # I nclude virtual = "/myfile.doc" -->
RTF document<% Response. ContentType = "application/rtf" %>
<! -- # I nclude virtual = "/myfile. rtf" -->
Microsoft excel document<% Response. ContentType = "application/vnd. ms-excel" %>
<! -- # I nclude virtual = "/myfile.xls" -->
Microsoft powerpoint document<% Response. ContentType = "application/ms-powerpoint" %>
<! -- # I nclude virtual = "/myfile. pff" -->
PDF document<% Response. ContentType = "application/pdf" %>
<! -- # I nclude virtual = "/myfileprohibited" -->
ZIP document<% Response. ContentType = "application/zip" %>
<! -- # I nclude virtual = "/myfile.zip" -->
Below is a more detailed 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 ',
'Mfa' => 'application/vnd. mfa ',
'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-ctor ',
'Dir' => 'application/x-ctor ',
'Dxr' => 'application/x-ctor ',
'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 ',
'Textinfo' => 'application/x-textinfo ',
'Text' => 'application/x-textinfo ',
'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 ',
'A' => '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 ',
'Gies' => 'model/iges ',
& Apos; iges & apos; = & apos; model/iges & apos ',
'Msh' => 'model/mesh ',
'Mesh '=> 'model/mesh ',
'Silo' => 'model/mesh ',
'Wrl' => 'model/jpa ',
'Jpa' => 'model/jpa ',
'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 ',
'Av' => 'video/x-msvideo ',
'Movi' => 'video/x-sgi-movi ',
'Ice '=> 'x-conference/x-cooltalk'
0 0
0
(Please comment on the article)