简单问题请教:StreamWriter 可以将文件生成在服务器端,并提示客户端下载吗? rt,谢谢!!!!http://community.csdn.net/Expert/topic/4183/4183769.xml?temp=.7792475 这个简单问题也帮着看一下吧,有20分:) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /// <summary> /// 文件下载 /// </summary> /// <param name="FullFileName"></param> private void FileDownload(string FullFileName) { FileInfo DownloadFile = new FileInfo(FullFileName); Response.Clear(); Response.ClearHeaders(); Response.Buffer=false; Response.ContentType="application/octet-stream"; Response.AppendHeader("Content-Disposition","attachment;filename=" +HttpUtility.UrlEncode(DownloadFile.FullName,System.Text.Encoding.UTF8)); Response.AppendHeader("Content-Length",DownloadFile.Length.ToString()); Response.WriteFile(DownloadFile.FullName); Response.Flush(); Response.End(); } socket通讯迸发问题 repeater事件 怎么样才能无刷新 闪动 大家帮我看看这个问题 asp.net(c#)中如何统计Session呀? 上传多个文件后,怎么动态的用HyperLink链接绑定,以便可以直接打开,~~~~在线等哦~~~~ 弹出页面的问题! hidden问题! 关于自定义控件,要做一个“可编辑的下拉框”。 在ASP。NET中难道不能做出想PB那样的图型报表吗? StreamWriter的问题 大量数据实时输出,怎么实现在同一行刷新输出?
/// 文件下载
/// </summary>
/// <param name="FullFileName"></param>
private void FileDownload(string FullFileName)
{
FileInfo DownloadFile = new FileInfo(FullFileName);
Response.Clear();
Response.ClearHeaders();
Response.Buffer=false;
Response.ContentType="application/octet-stream";
Response.AppendHeader("Content-Disposition","attachment;filename=" +HttpUtility.UrlEncode(DownloadFile.FullName,System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length",DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.End();
}