我上传文件后会出现一个弹出窗口,
ClientScript.RegisterStartupScript (Me.GetType(), "Javascript", "javascript:
window.open ('http://rsspl05/DocAdmin/confirmmsg.aspx?tdnum=" & TDnum &
"','mywindow','width=800,height=400,location=no');", True)
但是我得到的弹出窗口是一个带有Page Source:
的空白页面<!-- beginning of HttpRedirect.htm file -->
<script type="text/javascript">
function redirectToHttps()
{
var httpURL = window.location.hostname+window.location.pathname;
var httpsURL = "https://" + httpURL ;
window.location = httpsURL ;
}
redirectToHttps();
</script>
<!-- end of HttpRedirect.htm file -->
并且实际的aspx代码是:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Confirmmsg.aspx.vb" Inherits="docadmin_Confirmmsg" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Technical Documents</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function confirmmsg(val)
{
// // alert(val + ' has been uploaded successfully.');
//
//if(confirm("Do you want to upload another document?")==true){
// window.location.href="UploadDoc.aspx";
///}else{
// window.location.href="../Search.aspx";
// }
self.close();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align:center">
The document has been successfully uploaded.The link to the document:<asp:HyperLink
ID="lnkpath" runat="server" Target="_blank" Visible="false">HyperLink</asp:HyperLink>
<br /><asp:Button ID="btnOk" runat="server" Text="OK" /></div>
</form>
</body>
</html>
答案 0 :(得分:1)
确保以下几点:
检查弹出式代码隐藏文件中是否存在导致问题的任何内容
仔细检查最终(不正确)弹出网址以查看它是否是您调用的文件,如果它重定向到其他位置,请跟踪/调试您的流程以查看可能导致它的原因。
< / LI>这只是一个非常通用的选项,如果你找到了什么,请告诉我。希望它有所帮助。
答案 1 :(得分:1)
该页面是重定向到https页面(而不是http) - 您的服务器是否配置为仅提供https?也许网址http://rsspl05/DocAdmin/confirmmsg.aspx应为https://rsspl05/DocAdmin/confirmmsg.aspx