protected void Button3_Click(object sender, EventArgs e) { JuicDao dao = new JuicDao("MENU"); var DELUserdata = dao.DeleteUserdata(User.Identity.Name.ToString()); var Userdata = dao.InsertUserdata(User.Identity.Name.ToString(), TextBox4.Text, TextBox6.Text, TextBox5.Text, TextBox8.Text, TextBox11.Text, TextBox10.Text, TextBox9.Text, "N"); string strJS = "alert('申請成功,請在下方確認申請資料');location.href = ('User.aspx');"; Page.ClientScript.RegisterStartupScript(this.GetType(), "", strJS, true); }