本文介绍了window.open的浏览器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我在面对某些浏览器问题时,在按钮上点击后打开新标签已检查。

Hi friends,

I am facing some browser issue while opening the new tab on buttonclick after condition is checked.

protected void btnPrint_Click(object sender, EventArgs e)
{
    DataTable dt = ....;
    if (dt.Rows.Count != 0)
    {
        string redirect = "<script>window.open('some other page');</script>";
        Response.Write(redirect);
    }
    else
    {
        this.ClientScript.RegisterStartupScript(this.GetType(), "Startupalert", "alert('No details to show');", true);
    }
}





因为它可以正常使用 Firefox IE 但不在 Chrome ...

可以请任何人给出一些建议????



as it is working fine with Firefox and IE but not in Chrome...
Can any one please give some suggestions????

推荐答案


这篇关于window.open的浏览器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:56
查看更多