【发布时间】:2017-03-09 17:46:35
【问题描述】:
我想直接打开 pdf 文件而不询问打开,保存选项(提示窗口)。在这个 temppath 是我网站中 pdf 的路径。但是使用这个代码新窗口正在打开但文件没有打开。当我复制 temppath直接打开浏览器。
代码:
string url = tempPath;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), Guid.NewGuid().ToString(), "window.open ('" + url + "');", true);
【问题讨论】: