【发布时间】:2013-07-02 15:03:29
【问题描述】:
我一直在做一个噩梦,得到一个打开文件的方法,直到我在 Chrome 中测试了这个过程并发现它有效,所以它只能是 IE 中的一个问题。不幸的是,有些用户肯定会使用 IE,所以我仍然需要解决这个问题。这是我得到的:
Protected Sub OpenFile(filePath As String)
If dlCvFlName Is Nothing Or dlCvFlPath Is Nothing Then
lblError.Text = 'The Candidate does not have a CV uploaded'
Else
Dim script As String = "window.open('" & filePath & "', 'Popup', '_newtab');"
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "open", script, True)
End If
End Sub
OpenFile("www.domain.com/file/document.doc")
当我在 chrome 中运行此文件时,文件已成功打开,但在 IE 中绝对没有任何反应...
请帮忙...?
【问题讨论】:
-
您是否尝试将 http:// 添加到文件路径?
-
是的,我在实际代码中有这个,我只是忘了把它放在这里......虽然它在 chrome 中工作正常,现在真的让我很烦......
标签: asp.net vb.net internet-explorer google-chrome