知识大全 asp.net下载文件
Posted 文件
篇首语:富贵不淫贫贱乐,男儿到此是豪雄。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 asp.net下载文件相关的知识,希望对你有一定的参考价值。
System IO FileInfo file = new System IO FileInfo(pstrFilePath);
if (file Exists)
Response Clear();
Response Charset = GB ;
Response ContentEncoding = System Text Encoding UTF ;
Response AddHeader( Content Disposition attachment;filename= + Server UrlEncode(file Name));
Response AddHeader( Conten Length file Length ToString());
Response ContentType = application/ms excel ;
Response WriteFile(file FullName);
Response End();
下面是更详细的ContentType
ez => application/andrew inset
hqx => application/mac binhex
cpt => application/mac pactpro
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
cha138/Article/program/net/201311/12594相关参考
ASP.NET从服务器下载文件 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! stringfil
ASP.NET中文件上传下载方法集合 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 文件的上传下
ASP.NET文件下载函数使用浅析 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! ASPNET文
步骤 )先引用ICSharpCodeSharpZipLibdll )cs文件引入 usingSystemIO;usingSystemText; usingICSharpCodeSharpZ
ASP.NET中大文件下载的跟踪和恢复 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 在Web应
一//TransmitFile实现下载 protectedvoidButton_Click(o
cha138/Article/program/net/201311/14277
ASP.NET简单下载的实现 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 简单页面下载通过Re
最受欢迎的ASP.NET的CMS下载 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! Umbrac
ASP.NET中防止Access数据库下载 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 如何防