asp.net 后台按钮事件弹出新页而不被阻止

protected void Page_Load(object sender, EventArgs e)
    {
        this.Button1.Attributes.Add("onclick","this.form.target = '_blank'");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string url = "http://www.baidu.com";
        this.Response.Redirect(url);
    }

posted @ 2015-11-12 18:19  燕儿归  阅读(270)  评论(0编辑  收藏  举报