需要下载服务器上word文件
在按钮事件中怎么写程序?
在按钮事件中怎么写程序?
解决方案 »
- 下面的语句为什么取不到EXCEL的路径?
- asp 中能更新access数据库主键的值吗?
- GridView 如何使数据库中读取出来的项以DropDownList显示
- .net 连接 oracle 字符串问题
- 帮帮小弟!! gridview问题!!1
- !!!再贴一个[DataGrid超连接列的问题]
- 一个郁闷了很久的问题,高手请进
- 江雨.net 大哥请进来帮帮忙,关于TreeView中CheckBox的问题(急)
- 用asp.net做成outlook中附件那樣的(幫忙....)
- 在datagrid中有一个itemtempletcolumn,里面有dropdownlist。。。。急
- StringWriter在那个命名空间内?
- da.InsertCommand.CommandText
WebForm.Response.ClearHeaders()
WebForm.Response.Clear()
WebForm.Response.Expires = 0
WebForm.Response.Buffer = True
WebForm.Response.AddHeader("Accept-Language", "zh-tw")
'文件名称
WebForm.Response.AddHeader("content-disposition", "attachment; filename=" & Chr(34) & System.Web.HttpUtility.UrlEncode(FileNameWhenUserDownload, System.Text.Encoding.UTF8) & Chr(34))
WebForm.Response.ContentType = "Application/octet-stream"
'文件内容
WebForm.Response.Write(FileBody)
WebForm.Response.End()
End Function
上面的网址我回答得很详细了.