日期:2014-05-17  浏览次数:20381 次

求:ashx 输出下载文件 type为application/octet-stream flash能直接播放?
输出代码
C# code
context.Response.ContentType = "application/octet-stream";
                context.Response.AddHeader("Content-Disposition", "attachment;FileName=" + System.Web.HttpUtility.UrlEncode(fileName));
                context.Response.BinaryWrite(bytes);



想在html页面直接通过flash的src访问。。但读不了。空白的。

------解决方案--------------------
前台的HTML元素引用这个ashx的地址应该可以的~
------解决方案--------------------
flv
Response.ContentType = "video/x-flv"

如果是MP3之类的
Response.ContentType = "audio / wav";