问一个简单的文件打开问题,各位大侠帮忙唉! 服务器上直接操作才可以你用 <a href="http://computername/test.doc">aaa</a>把文件放在网站目录下即可 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Label9.Text = "<a href='"+Server.MapPath("test.doc")+"'>" & dsPlan.Tables(0).Rows(0)("Pattach1").ToString() & "</a>" 在e:\下的文件一般都不是外界能通过http来访问的你可以用一个aspx文件来读取它的内容, 并传给客户端string strFile = "e:\\test.doc";FileStream fs = new FileStream(strFile, FileMode.Open);byte[] bytes = new byte[(int)fs.Length];fs.Read(bytes, 0, bytes.Length);fs.Close();Response.ContentType = "application/octet-stream";Response.AddHeader("Content-Disposition", "attachment;filename=" & strFile);Response.BinaryWrite(bytes);Response.End(); dropdownlist GridView选中行就自动跳到第一行去了,每次还得拉滚动条! 关于生成缩略图,资源不释放的总问题。 求一个方法 请问用正则表达式截图网页源码中自己想要的数据然后再保存到数据库中 请问在母版页中如何让网页自动适应显示器的当前分辨率? 关于IHttpModule RUL重写问题 查询条件不一 能使用索引视图吗? asp.net实现数据棒图求教 请教高手们一个datagrid显示结果的问题。 没辙了,只有来这里求助了,MSN现在不能登录了 水晶报表如何打印自定义尺寸的页面,在线给分...
string strFile = "e:\\test.doc";
FileStream fs = new FileStream(strFile, FileMode.Open);
byte[] bytes = new byte[(int)fs.Length];
fs.Read(bytes, 0, bytes.Length);
fs.Close();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" & strFile);
Response.BinaryWrite(bytes);
Response.End();