protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.Btn_Search.Attributes.Add("onclick", "this.form.target='_newName'");//失效
}
}怎么让它起作用,Btn_Search的 Response.Redirect("ShowSearchInfo.aspx")在新的页面上打开。
{
if (!IsPostBack)
{
this.Btn_Search.Attributes.Add("onclick", "this.form.target='_newName'");//失效
}
}怎么让它起作用,Btn_Search的 Response.Redirect("ShowSearchInfo.aspx")在新的页面上打开。
this.Btn_Search.Attributes.Add("onclick", "this.form.target='_blank'");
</asp:ScriptManager>
{
ScriptManager1.RegisterPostBackControl((Control)sender);
}
ScriptManager.RegisterStartupScript(Btn_Search,GetType(), "js", "window.open('ShowSearchInfo.aspx')", true);