我目前有:
String url = "../CustomerSettings/CustomerConfiguration.aspx?CustomerID=" + sqlCommand.Parameters["@ReturnCustomerID"].Value.ToString();
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myUniqueKey", "self.parent.location='"+url+"';", true);
这非常适合重定向父页面但我需要它来打开一个新标签。有什么建议吗?
答案 0 :(得分:0)
这样的事情应该有效:
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myUniqueKey", "window.open(" + url + ",'_blank');", true);