RT

解决方案 »

  1.   

    Response.Clear ();
    Response.ClearHeaders ();
    Response.Charset = "GB2312";
    Response.ContentEncoding =System.Text.Encoding.UTF8;
    Response.ContentType = "application/octet-stream";
    Response.AppendHeader("Content-Disposition", "attachment;FileName="+this.Server.UrlEncode(FileName));//FileName为文件名
    Response.AppendHeader("Content-Length", memStream.Length.ToString());byte[] bytes=new byte[(int)memStream.Length];
    memStream.Position =0;
    memStream.Read (bytes,0,(int)memStream.Length );
    Response.BinaryWrite(bytes);
    memStream.Close ();
    Response.End();
    ====CSDN 小助手 V2.5 2005年11月05日发布====
    CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
    界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/11/05/523395.aspx
    下载:http://szlawbook.com/csdnv2
      

  2.   

    什么意思?
    是指把声音文件直接写到客户端还是指客户端点击声音文件能够听到?
    如果是前者,不可以,服务端不能把文件写到客户端;如果是后者,可以,客户端直接点击该声音文件所在链接就可以直接调用播放,类似如下:
    <a href="../audio/xxx.mp3">播放声音</a>
      

  3.   

    下载:WebClient wc=new WebClient();
    wc.DownloadFile ("图片路径","本地图片路径")