不让 IE 打开txt rt就是希望 在IE 中打开 txt 文件时,实现 下载 该txt文件 或 把这个txt文件 另存为 这个功能 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不能直接超连 .txt 文件的地址。参考:string strPathServer = this.p_strFtpFilePath + "\\";string strFileServerName = e.Item.Cells[4].Text;string contentType = "application/"; string strFileSaveName = ((LinkButton)e.Item.FindControl("BtnAttachName")).Text;DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();diskOpts.DiskFileName = strPathServer + strFileServerName;HttpContext.Current.Response.Clear();HttpContext.Current.Response.Charset ="GB2312";HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + strFileSaveName);HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;HttpContext.Current.Response.ContentType = contentType;HttpContext.Current.Response.WriteFile(diskOpts.DiskFileName);HttpContext.Current.Response.End(); varbinary类型 求一个正则表达式 关于类型转换的问题 问个jmail发送邮件的问题 我想获取正在运行中的程序A,有几个正在操作系统中运行? vs2005开发wince 5 时,用c#如何读取驱动呢? C#横向的水晶报表转成竖向的pdf文件 大家就知道动态天气图片那里有下载的呀,就是下雨什么的能够显示下雨,的效果 接收电子邮件 我的机子上不了 www.sun.com ,是不是装了 IE6 的缘故或者是 .net 的缘故??? c#与asp.net 关系 救急!!C# 代码安全性,System.Security.SecurityException问题
string strFileServerName = e.Item.Cells[4].Text;
string contentType = "application/";
string strFileSaveName = ((LinkButton)e.Item.FindControl("BtnAttachName")).Text;
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
diskOpts.DiskFileName = strPathServer + strFileServerName;HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Charset ="GB2312";
HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + strFileSaveName);
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
HttpContext.Current.Response.ContentType = contentType;
HttpContext.Current.Response.WriteFile(diskOpts.DiskFileName);
HttpContext.Current.Response.End();