string fileExtension=context.Request.Url.LocalPath;
context.Response.Expires = 0;
context.Response.Clear();
switch (fileExtension) { case ".mp3": context.Response.ContentType = "audio/mpeg3"; break; case "mpeg": context.Response.ContentType = "video/mpeg"; break; default: context.Response.ContentType = "application/octet-stream"; break; }
//context.Response.ContentType="image/jpeg";
string filePath = context.Server.MapPath(context.Request.Url.LocalPath);
context.Response.WriteFile(filePath);
context.Response.End();
context.Response.Expires = 0;
context.Response.Clear();
switch (fileExtension) { case ".mp3": context.Response.ContentType = "audio/mpeg3"; break; case "mpeg": context.Response.ContentType = "video/mpeg"; break; default: context.Response.ContentType = "application/octet-stream"; break; }
//context.Response.ContentType="image/jpeg";
string filePath = context.Server.MapPath(context.Request.Url.LocalPath);
context.Response.WriteFile(filePath);
context.Response.End();
CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/10/16/504620.aspx
下载:http://szlawbook.com/csdnv2/csdnv2.rar为神六喝彩,向所有科技工作者致敬!
拒绝日货。