如何从Iframe中打开重定向页面以在ASP.NET的父窗口中作为新选项卡打开?

时间:2013-03-21 17:46:55

标签: c# asp.net iframe tabs

我目前有:

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

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

这非常适合重定向父页面但我需要它来打开一个新标签。有什么建议吗?

1 个答案:

答案 0 :(得分:0)

这样的事情应该有效:

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