簡體   English   中英

如何打開從Iframe重定向的頁面,以在ASP.NET的父窗口中作為新標簽打開?

[英]How to open the redirected page from Iframe to open as a new tab in the parent window in ASP.NET?

我目前有:

        String url = "../CustomerSettings/CustomerConfiguration.aspx?CustomerID=" + sqlCommand.Parameters["@ReturnCustomerID"].Value.ToString();

        this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myUniqueKey", "self.parent.location='"+url+"';", true);

這對重定向父頁面很有用,但是我需要它來打開一個新標簽頁。 有什么建議么?

這樣的事情應該起作用:

this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myUniqueKey", "window.open(" + url + ",'_blank');", true);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM