1、Response.Write()打開新視窗 Response.Write(" <script type='text/JavaScript'>window.open('" + url + "','_blank'); </script>"); 2、asp.net打開新視窗的多種方法 1.Respon ...
1、Response.Write()打開新視窗
Response.Write(" <script type='text/JavaScript'>window.open('" + url + "','_blank'); </script>");
2、asp.net打開新視窗的多種方法
1.Response.Redirect("XXX.aspx",true)——直接轉向新的頁面,原視窗被代替; 2. Response.Write("<script>window.open(XXX.aspx'',''_blank'')</script>")——原視窗保留,另外新增一個新頁面; 3.Response.Write("<script>window.location=XXX.aspx''</script>")——打開新的頁面,原視窗被代替; 4.Server.Transfer("XXX.aspx")——打開新的頁面; 5.Response.Write("<script>window.showModelessDialog(XXX.aspx'')</script>")——原視窗保留,以對話框形式打開新視窗; 6.Response.Write("<script>window.showModalDialog(XXX.aspx'')</script>")——對話框形式打開新視窗,原視窗被代替;