复制代码 代码如下:
<script language="C#" runat="server">
protected void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "application/x-shockwave-flash";
string fileFlash = Server.MapPath("/") + "1.swf";
System.IO.FileStream fileStream = new System.IO.FileStream(fileFlash, System.IO.FileMode.Open);
byte[] buffer = new byte[fileStream.Length];
fileStream.Read(buffer,0,(int)fileStream.Length);
Response.BinaryWrite(buffer);
}
</script>
<script language="C#" runat="server">
protected void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "application/x-shockwave-flash";
string fileFlash = Server.MapPath("/") + "1.swf";
System.IO.FileStream fileStream = new System.IO.FileStream(fileFlash, System.IO.FileMode.Open);
byte[] buffer = new byte[fileStream.Length];
fileStream.Read(buffer,0,(int)fileStream.Length);
Response.BinaryWrite(buffer);
}
</script>
标签:
asp.net,下载文件
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“asp.net 下载文件时输出文件内容”评论...