一、Response.Write()打開新窗口asp.net
Response.Write(" <script type='text/JavaScript'>window.open('" + url + "','_blank'); </script>");
二、asp.net打開新窗口的多種方法less
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>")——對話框形式打開新窗口,原窗口被代替;