Response.ContentType="application/x-msdownload";
Response.AddHeader ("Content-Disposition", "attachment; filename="+filename+";charset=GB2312");
Server.Transfer(filedown);如果filedown是.asp文件,那么就会出错
我是想能过这段代码实现文件下载,不管是什么文件,请大家帮忙
Response.AddHeader ("Content-Disposition", "attachment; filename="+filename+";charset=GB2312");
Server.Transfer(filedown);如果filedown是.asp文件,那么就会出错
我是想能过这段代码实现文件下载,不管是什么文件,请大家帮忙
转向到ASP文件?文件头变为application/x-msdownload格式,但asp文件必须运行在html格式下,出错是肯定的.不过你可创建一个里面没有任何服务端代码与脚本的asp文件看看.