1. 程式人生 > >ASP .NET Response類型

ASP .NET Response類型

type excel pre content plain cati .html code resp

.ContentType
 .htm,.html    Response.ContentType = "text/HTML";
 .txt    Response.ContentType= "text/plain";
 .doc,.rtf, .docx   Response.ContentType = "Application/msword";
 .xls,.xlsx   Response.ContentType = "Application/x-msexcel";
 .jpg,.jpeg   Response.ContentType = "image/jpeg";
 .gif    Response.ContentType = "image/GIF";
 .pdf    Response.ContentType= "application/pdf";

ASP .NET Response類型