当用户点击按钮时,我想在不同的选项卡中打开一个.aspx/.html页面,并在同一个选项卡中打开一个.aspx/.html页面。是否可以添加2 Response.Redirect,一个将打开在不同的选项卡,另一个将打开在同一个选项卡中,使用C#?
示例代码:
string redirect = "<script>window.open('../User/Profile.html');</script>";
Response.Write(redirect);
Response.Redirect("../User/NewUser.aspx",true);
感谢Adance!
潜在的重复数据删除:http://stackoverflow.com/questions/16896284/opening-a-url-in-a-new-tab –
在这种解决方案,他们正在使用
window.location.href
那么它在所有浏览器工作的OnClientClick和OnClick方法。我不能这样做,因为我必须先执行.net代码,然后只重定向到两个页面。 – HP1104