button1的click事件下有2句话,单独执行哪个都好使,可是放到一块就不行了,只能不弹出消息,直接转到form2页了,怎么能弹出消息,再转到form2页呢??
private void Button1_Click(object sender, System.EventArgs e)
{ Response.Write("<script>window.alert('即将转到form2页');</script>");
Response.Redirect("form2.aspx"); }
private void Button1_Click(object sender, System.EventArgs e)
{ Response.Write("<script>window.alert('即将转到form2页');</script>");
Response.Redirect("form2.aspx"); }
Response.Write("<script>window.open('form2.aspx');</script>");
----------------------------------
改为
Response.Write("<script>window.location.href='WebForm.aspx';</script>");