0

我目前有:

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

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

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

4

1 回答 1

0

像这样的东西应该工作:

this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myUniqueKey", "window.open(" + url + ",'_blank');", true);
于 2013-03-21T17:57:06.657 回答