关于导出word文档修改文件名的问题(急需帮助)
<%
index=request("index")
set Conn=server.createobject("ADODB.connection")
Conn.Open "Data Source=" & Server.Mappath("../data/hr.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"
sql2="select * from gr where index="&index
rs.open sql2,conn,3,3
name=rs("name")
title=rs("title")
filename1=name@title
Response.Buffer = True
Response.ContentType ="application/vnd.ms-word"
Response.AddHeader "Content-Disposition", "attachment; filename=2011.doc"
%>
这句放在.asp文件的文件头,导出的word的文件名为:2011,
请教怎么把参数filename1传递给filename,以参数命名
------解决方案--------------------
这样不行吗?[code=VBScript][/code]
VBScript code
Response.AddHeader "Content-Disposition", "attachment; filename="&filename1&".doc"