主题:使用Response.ContentType后页面刷新问题
我在网页中使用
Response.ContentType="application/octet-stream"
Response.AddHeader "content-disposition","attachment;filename=jhs.doc"
将查询结果导出到word文档jhs.doc中。但导出完成后,要将页面刷新时却发现了问题,如果用
Response.Write "<script language=javascript>window.location.href='programMain.asp';</script>",将页面重新调用一次,却不起作用,如果用Response.Redirect('programMain.asp'),又无法导出word文档,直接转向了。请问有什么办法解决?
Response.ContentType="application/octet-stream"
Response.AddHeader "content-disposition","attachment;filename=jhs.doc"
将查询结果导出到word文档jhs.doc中。但导出完成后,要将页面刷新时却发现了问题,如果用
Response.Write "<script language=javascript>window.location.href='programMain.asp';</script>",将页面重新调用一次,却不起作用,如果用Response.Redirect('programMain.asp'),又无法导出word文档,直接转向了。请问有什么办法解决?