3
我想在加载自己的同时在新窗口中打开asp.net页面。我试着用下面的代码。但它在同一个窗口中打开,而不是在新窗口中打开。在新窗口中打开asp.net页面
protected void Page_Load(object sender, EventArgs e)
{
if (HttpContext.Current.Request.UserAgent != null)
{
var userAgent = HttpContext.Current.Request.UserAgent.ToLower();
if (userAgent.Contains("iphone;"))
{
// iPhone
Form.Target = "_blank";
}
}
}
任何帮助表示赞赏。谢谢 !!
http://stackoverflow.com/questions/16145187/how-to-open-a-page-in-a-new-window-or-tab-from-code-behind –