2012-04-25 60 views
2

我有一個彈出窗口中的文件後出現的上傳,頁面視圖不理想,HTML沒有出現,頁面是空白

ClientScript.RegisterStartupScript (Me.GetType(), "Javascript", "javascript: 
    window.open ('http://rsspl05/DocAdmin/confirmmsg.aspx?tdnum=" & TDnum & 
    "','mywindow','width=800,height=400,location=no');", True) 

但彈出,我得到的是第一個空白頁來源:

<!-- 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> 

回答

1

確保以下幾件事情:

  • 要調用正確的URL /文件
  • 你的aspx頁面繼承了正確的代碼隱藏文件
  • 檢查有沒有在你的彈出代碼隱藏文件,這將導致該問題

  • 仔細檢查最終(不正確)的彈出網址,看看它是否是您調用的文件,如果它重定向到其他位置,請跟蹤/調試您的流程流以查看可能導致它的原因。

這只是一個非常通用的選項,所以讓我知道如果你找到一些東西。希望能幫助到你。

+0

感謝buddyy,不好看看它 – shradha 2012-04-25 10:46:53