Asp.net 重定向以及打开新窗口
我在页面中有一个保存按钮,在成功执行后,我需要将其重定向到成功页面,同时需要使用javascript打开另一个窗口 我可以打开一个新窗口或重定向页面Asp.net 重定向以及打开新窗口,asp.net,Asp.net,我在页面中有一个保存按钮,在成功执行后,我需要将其重定向到成功页面,同时需要使用javascript打开另一个窗口 我可以打开一个新窗口或重定向页面 save(){ //Some code here ClientScript.RegisterStartupScript(GetType(), "js", "window.open('http:/xyz.com');", true); Response.redirect("abc.aspx"); } 试试这个 ScriptM
save(){
//Some code here
ClientScript.RegisterStartupScript(GetType(), "js", "window.open('http:/xyz.com');", true);
Response.redirect("abc.aspx");
}
试试这个
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "a", "window.open('http:/xyz.com');", true);
Response.Redirect("abc.aspx");
您必须在url中写入双精度/in。“window.open('http:/xyz.com');window.location.href='abc.aspx'”